diff options
| -rw-r--r-- | api/system-current.txt | 2 | ||||
| -rw-r--r-- | core/java/android/app/role/RoleManager.java | 50 | ||||
| -rw-r--r-- | core/res/res/values/config.xml | 4 | ||||
| -rw-r--r-- | core/res/res/values/public.xml | 4 |
4 files changed, 35 insertions, 25 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index dc914af37efb..f4c277482e6d 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -239,6 +239,8 @@ package android { field public static final int config_defaultAssistant = 17039393; // 0x1040021 field public static final int config_defaultBrowser = 17039394; // 0x1040022 field public static final int config_defaultDialer = 17039395; // 0x1040023 + field public static final int config_defaultGallery = 17039398; // 0x1040026 + field public static final int config_defaultMusic = 17039397; // 0x1040025 field public static final int config_defaultSms = 17039396; // 0x1040024 field public static final int config_feedbackIntentExtraKey = 17039391; // 0x104001f field public static final int config_feedbackIntentNameKey = 17039392; // 0x1040020 diff --git a/core/java/android/app/role/RoleManager.java b/core/java/android/app/role/RoleManager.java index 04d5c5aaa1d5..edd3ef983945 100644 --- a/core/java/android/app/role/RoleManager.java +++ b/core/java/android/app/role/RoleManager.java @@ -69,6 +69,22 @@ public final class RoleManager { private static final String LOG_TAG = RoleManager.class.getSimpleName(); /** + * The name of the assistant app role. + * + * @hide + */ + @SystemApi + @TestApi + public static final String ROLE_ASSISTANT = "android.app.role.ASSISTANT"; + + /** + * The name of the browser role. + * + * @see Intent#CATEGORY_APP_BROWSER + */ + public static final String ROLE_BROWSER = "android.app.role.BROWSER"; + + /** * The name of the dialer role. * * @see Intent#ACTION_DIAL @@ -83,18 +99,18 @@ public final class RoleManager { public static final String ROLE_SMS = "android.app.role.SMS"; /** - * The name of the browser role. + * The name of the emergency role * - * @see Intent#CATEGORY_APP_BROWSER + * @see android.telephony.TelephonyManager#ACTION_EMERGENCY_ASSISTANCE */ - public static final String ROLE_BROWSER = "android.app.role.BROWSER"; + public static final String ROLE_EMERGENCY = "android.app.role.EMERGENCY"; /** - * The name of the gallery role. + * The name of the home role. * - * @see Intent#CATEGORY_APP_GALLERY + * @see Intent#CATEGORY_HOME */ - public static final String ROLE_GALLERY = "android.app.role.GALLERY"; + public static final String ROLE_HOME = "android.app.role.HOME"; /** * The name of the music player role. @@ -104,18 +120,11 @@ public final class RoleManager { public static final String ROLE_MUSIC = "android.app.role.MUSIC"; /** - * The name of the home role. - * - * @see Intent#CATEGORY_HOME - */ - public static final String ROLE_HOME = "android.app.role.HOME"; - - /** - * The name of the emergency role + * The name of the gallery role. * - * @see android.telephony.TelephonyManager#ACTION_EMERGENCY_ASSISTANCE + * @see Intent#CATEGORY_APP_GALLERY */ - public static final String ROLE_EMERGENCY = "android.app.role.EMERGENCY"; + public static final String ROLE_GALLERY = "android.app.role.GALLERY"; /** * The name of the car mode dialer app role. @@ -173,15 +182,6 @@ public final class RoleManager { public static final String ROLE_CALL_COMPANION = "android.app.role.CALL_COMPANION"; /** - * The name of the assistant app role. - * - * @hide - */ - @SystemApi - @TestApi - public static final String ROLE_ASSISTANT = "android.app.role.ASSISTANT"; - - /** * @hide */ @IntDef(flag = true, value = { MANAGE_HOLDERS_FLAG_DONT_KILL_APP }) diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index a501ae2661c6..130f6291b516 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -1951,6 +1951,10 @@ <string name="config_defaultDialer" translatable="false">com.android.phone</string> <!-- The name of the package that will hold the SMS role by default. --> <string name="config_defaultSms" translatable="false">@string/default_sms_application</string> + <!-- The name of the package that will hold the music role by default. --> + <string name="config_defaultMusic" translatable="false">com.android.music</string> + <!-- The name of the package that will hold the gallery role by default. --> + <string name="config_defaultGallery" translatable="false">com.android.gallery3d</string> <!-- Enable/disable default bluetooth profiles: HSP_AG, ObexObjectPush, Audio, NAP --> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index d5cefc4e4818..d2c3b40cc3b6 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -2979,6 +2979,10 @@ <public name="config_defaultDialer" /> <!-- @hide @SystemApi --> <public name="config_defaultSms" /> + <!-- @hide @SystemApi --> + <public name="config_defaultMusic" /> + <!-- @hide @SystemApi --> + <public name="config_defaultGallery" /> </public-group> <public-group type="bool" first-id="0x01110000"> |