diff options
| -rw-r--r-- | api/system-current.txt | 5 | ||||
| -rw-r--r-- | api/test-current.txt | 5 | ||||
| -rw-r--r-- | core/res/res/values/config.xml | 30 | ||||
| -rw-r--r-- | core/res/res/values/public.xml | 13 | ||||
| -rw-r--r-- | core/res/res/values/symbols.xml | 1 | ||||
| -rw-r--r-- | services/core/java/com/android/server/policy/role/LegacyRoleResolutionPolicy.java | 4 |
6 files changed, 39 insertions, 19 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 02718cbaac07..dc914af37efb 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -201,7 +201,6 @@ package android { } public static final class R.array { - field public static final int config_defaultRoleHolders = 17235974; // 0x1070006 field public static final int config_keySystemUuidMapping = 17235973; // 0x1070005 } @@ -237,6 +236,10 @@ package android { } public static final class R.string { + 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_defaultSms = 17039396; // 0x1040024 field public static final int config_feedbackIntentExtraKey = 17039391; // 0x104001f field public static final int config_feedbackIntentNameKey = 17039392; // 0x1040020 field public static final int config_helpIntentExtraKey = 17039389; // 0x104001d diff --git a/api/test-current.txt b/api/test-current.txt index 2c8d08c49fdb..7117d7bc19a3 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -17,8 +17,9 @@ package android { field public static final String WRITE_OBB = "android.permission.WRITE_OBB"; } - public static final class R.array { - field public static final int config_defaultRoleHolders = 17235974; // 0x1070006 + public static final class R.string { + field public static final int config_defaultAssistant = 17039393; // 0x1040021 + field public static final int config_defaultDialer = 17039395; // 0x1040023 } } diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index ec53811a6983..a501ae2661c6 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -1921,8 +1921,6 @@ cell broadcasting sms, and MMS. --> <bool name="config_sms_capable">true</bool> - <!-- TODO: STOPSHIP(b/110557011): Remove this from framework and overlays as we use - config_defaultRoleHolders now. --> <!-- Default SMS Application. This will be the default SMS application when the phone first boots. The user can then change the default app to one of their choosing. @@ -1930,15 +1928,29 @@ application is desired. If this string is empty or the specified package does not exist, then - the platform will search for an SMS app and use that (if there is one)--> + the platform will search for an SMS app and use that (if there is one) + + Note: This config is deprecated, please use config_defaultSms instead. --> <string name="default_sms_application" translatable="false">com.android.messaging</string> - <!-- Default role holders. This will be an array of roles and package names of their default - holders, with each item in the format of "ROLE_NAME: PACKAGE_NAME_1, PACKAGE_NAME_2". --> - <string-array name="config_defaultRoleHolders" translatable="false"> - <item>android.app.role.SMS: com.android.messaging</item> - <item>android.app.role.DIALER: com.android.phone</item> - </string-array> + <!-- Default web browser. This is the package name of the application that will + be the default browser when the device first boots. Afterwards the user + can select whatever browser app they wish to use as the default. + + If this string is empty or the specified package does not exist, then + the behavior will be as though no app was named as an explicit default. + + Note: This config is deprecated, please use config_defaultBrowser instead. --> + <string name="default_browser" translatable="false"></string> + + <!-- The name of the package that will hold the assistant role by default. --> + <string name="config_defaultAssistant" translatable="false" /> + <!-- The name of the package that will hold the browser role by default. --> + <string name="config_defaultBrowser" translatable="false">@string/default_browser</string> + <!-- The name of the package that will hold the dialer role by default. --> + <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> <!-- 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 e6d478aadae0..d5cefc4e4818 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -2971,6 +2971,14 @@ <public name="config_feedbackIntentExtraKey" /> <!-- @hide @SystemApi --> <public name="config_feedbackIntentNameKey" /> + <!-- @hide @SystemApi @TestApi --> + <public name="config_defaultAssistant" /> + <!-- @hide @SystemApi --> + <public name="config_defaultBrowser" /> + <!-- @hide @SystemApi @TestApi --> + <public name="config_defaultDialer" /> + <!-- @hide @SystemApi --> + <public name="config_defaultSms" /> </public-group> <public-group type="bool" first-id="0x01110000"> @@ -2990,11 +2998,6 @@ <public name="system_notification_accent_color" /> </public-group> - <public-group type="array" first-id="0x01070006"> - <!-- @hide @TestApi @SystemApi --> - <public name="config_defaultRoleHolders" /> - </public-group> - <!-- =============================================================== DO NOT ADD UN-GROUPED ITEMS HERE diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 1da91494306d..2f997e8c21aa 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -1034,6 +1034,7 @@ <java-symbol type="string" name="sipAddressTypeOther" /> <java-symbol type="string" name="sipAddressTypeWork" /> <java-symbol type="string" name="default_sms_application" /> + <java-symbol type="string" name="default_browser" /> <java-symbol type="string" name="sms_control_message" /> <java-symbol type="string" name="sms_control_title" /> <java-symbol type="string" name="sms_control_no" /> diff --git a/services/core/java/com/android/server/policy/role/LegacyRoleResolutionPolicy.java b/services/core/java/com/android/server/policy/role/LegacyRoleResolutionPolicy.java index e7de8ddf87d1..3534cf30e2bf 100644 --- a/services/core/java/com/android/server/policy/role/LegacyRoleResolutionPolicy.java +++ b/services/core/java/com/android/server/policy/role/LegacyRoleResolutionPolicy.java @@ -67,8 +67,8 @@ public class LegacyRoleResolutionPolicy implements RoleManagerService.RoleHolder mContext.getContentResolver(), Settings.Secure.SMS_DEFAULT_APPLICATION, userId); - // TODO: STOPSHIP: Remove the following code once we remove default_sms_application - // and use the new config_defaultRoleHolders. + // TODO: STOPSHIP: Remove the following code once we read the value of + // config_defaultSms in RoleControllerService. if (result == null) { Collection<SmsApplication.SmsApplicationData> applications = SmsApplication.getApplicationCollectionAsUser(mContext, userId); |