From 9eb69e9e9b8f28d920b0ff1461c52563340fd090 Mon Sep 17 00:00:00 2001 From: Hai Zhang Date: Thu, 7 Feb 2019 20:03:40 -0800 Subject: Use separate config entries for default role holders. Using a single config_defaultRoleHolders turned out to be problematic and error-prone when mixed with multiple overlays, so split it into separate config entries. Bug: 122730135 Test: build Change-Id: If5c3b54aab6cf86223dc428cd838a1e07d6036ab --- api/system-current.txt | 5 +++- api/test-current.txt | 5 ++-- core/res/res/values/config.xml | 30 +++++++++++++++------- core/res/res/values/public.xml | 13 ++++++---- core/res/res/values/symbols.xml | 1 + .../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. --> true - + 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. --> com.android.messaging - - - android.app.role.SMS: com.android.messaging - android.app.role.DIALER: com.android.phone - + + + + + + + @string/default_browser + + com.android.phone + + @string/default_sms_application 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 @@ + + + + + + + + @@ -2990,11 +2998,6 @@ - - - - -