AppClone: Changes to display app list on Cloned Apps page.
- Filers app list - Displays preference summary - Display two-target view - Display header text - Metric for cloned app page - Adds bridge class - Disable "Show system" option Bug: 259021576 Bug: 249916469 Test: make RunSettingsRoboTests -j64 Change-Id: Idcf213325ead9e298eb3e958b286adcd4c06c8d5
This commit is contained in:
@@ -164,6 +164,11 @@ public final class Utils extends com.android.settingslib.Utils {
|
||||
public static final String PROPERTY_HIBERNATION_TARGETS_PRE_S_APPS =
|
||||
"app_hibernation_targets_pre_s_apps";
|
||||
|
||||
/**
|
||||
* Whether or not Cloned Apps menu is available in Apps page. Default is false.
|
||||
*/
|
||||
public static final String PROPERTY_CLONED_APPS_ENABLED = "cloned_apps_enabled";
|
||||
|
||||
/**
|
||||
* Finds a matching activity for a preference's intent. If a matching
|
||||
* activity is not found, it will remove the preference.
|
||||
@@ -1252,4 +1257,17 @@ public final class Utils extends com.android.settingslib.Utils {
|
||||
public static int getHomepageIconColorHighlight(Context context) {
|
||||
return context.getColor(R.color.accent_select_primary_text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns user id of clone profile if present, else returns -1.
|
||||
*/
|
||||
public static int getCloneUserId(Context context) {
|
||||
UserManager userManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
|
||||
for (UserHandle userHandle : userManager.getUserProfiles()) {
|
||||
if (userManager.getUserInfo(userHandle.getIdentifier()).isCloneProfile()) {
|
||||
return userHandle.getIdentifier();
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user