Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,7 @@ 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 } Loading core/res/res/values/config.xml +8 −0 Original line number Diff line number Diff line Loading @@ -1892,6 +1892,8 @@ 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. Loading @@ -1910,6 +1912,12 @@ the behavior will be as though no app was named as an explicit default. --> <string name="default_browser" translatable="false"></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> </string-array> <!-- Enable/disable default bluetooth profiles: HSP_AG, ObexObjectPush, Audio, NAP --> <bool name="config_bluetooth_default_profiles">true</bool> Loading core/res/res/values/public.xml +5 −0 Original line number Diff line number Diff line Loading @@ -2985,6 +2985,11 @@ <public name="system_notification_accent_color" /> </public-group> <public-group type="array" first-id="0x01070006"> <!-- @hide @SystemApi --> <public name="config_defaultRoleHolders" /> </public-group> <!-- =============================================================== DO NOT ADD UN-GROUPED ITEMS HERE Loading services/core/java/com/android/server/policy/role/LegacyRoleResolutionPolicy.java +2 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,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. if (result == null) { Collection<SmsApplication.SmsApplicationData> applications = SmsApplication.getApplicationCollectionAsUser(mContext, userId); Loading services/core/java/com/android/server/role/RoleManagerService.java +4 −1 Original line number Diff line number Diff line Loading @@ -229,9 +229,12 @@ public class RoleManagerService extends SystemService implements RoleUserState.C // Any role for which we have a record are already migrated RoleUserState userState = getOrCreateUserState(userId); if (!userState.isRoleAvailable(role)) { userState.addRoleName(role); List<String> roleHolders = mLegacyRoleResolver.getRoleHolders(role, userId); if (roleHolders.isEmpty()) { return; } Slog.i(LOG_TAG, "Migrating " + role + ", legacy holders: " + roleHolders); userState.addRoleName(role); int size = roleHolders.size(); for (int i = 0; i < size; i++) { userState.addRoleHolder(role, roleHolders.get(i)); Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,7 @@ 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 } Loading
core/res/res/values/config.xml +8 −0 Original line number Diff line number Diff line Loading @@ -1892,6 +1892,8 @@ 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. Loading @@ -1910,6 +1912,12 @@ the behavior will be as though no app was named as an explicit default. --> <string name="default_browser" translatable="false"></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> </string-array> <!-- Enable/disable default bluetooth profiles: HSP_AG, ObexObjectPush, Audio, NAP --> <bool name="config_bluetooth_default_profiles">true</bool> Loading
core/res/res/values/public.xml +5 −0 Original line number Diff line number Diff line Loading @@ -2985,6 +2985,11 @@ <public name="system_notification_accent_color" /> </public-group> <public-group type="array" first-id="0x01070006"> <!-- @hide @SystemApi --> <public name="config_defaultRoleHolders" /> </public-group> <!-- =============================================================== DO NOT ADD UN-GROUPED ITEMS HERE Loading
services/core/java/com/android/server/policy/role/LegacyRoleResolutionPolicy.java +2 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,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. if (result == null) { Collection<SmsApplication.SmsApplicationData> applications = SmsApplication.getApplicationCollectionAsUser(mContext, userId); Loading
services/core/java/com/android/server/role/RoleManagerService.java +4 −1 Original line number Diff line number Diff line Loading @@ -229,9 +229,12 @@ public class RoleManagerService extends SystemService implements RoleUserState.C // Any role for which we have a record are already migrated RoleUserState userState = getOrCreateUserState(userId); if (!userState.isRoleAvailable(role)) { userState.addRoleName(role); List<String> roleHolders = mLegacyRoleResolver.getRoleHolders(role, userId); if (roleHolders.isEmpty()) { return; } Slog.i(LOG_TAG, "Migrating " + role + ", legacy holders: " + roleHolders); userState.addRoleName(role); int size = roleHolders.size(); for (int i = 0; i < size; i++) { userState.addRoleHolder(role, roleHolders.get(i)); Loading