Merge "Update icons in multiuser settings" into tm-qpr-dev am: a666d80973
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19745315
Change-Id: Id3e70245326590a9c7948fbbbd9da2bfab866d15
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/src/com/android/settings/users/UserSettings.java b/src/com/android/settings/users/UserSettings.java
index 914130d..de29aa4 100644
--- a/src/com/android/settings/users/UserSettings.java
+++ b/src/com/android/settings/users/UserSettings.java
@@ -1431,6 +1431,8 @@
&& mUserManager.canAddMoreUsers(UserManager.USER_TYPE_FULL_GUEST)
&& WizardManagerHelper.isDeviceProvisioned(context)
&& mUserCaps.mUserSwitcherEnabled) {
+ Drawable icon = context.getDrawable(R.drawable.ic_account_circle);
+ mAddGuest.setIcon(centerAndTint(icon));
isVisible = true;
mAddGuest.setVisible(true);
mAddGuest.setSelectable(true);
@@ -1450,11 +1452,15 @@
private void updateAddUser(Context context) {
updateAddUserCommon(context, mAddUser, mUserCaps.mCanAddRestrictedProfile);
+ Drawable icon = context.getDrawable(R.drawable.ic_account_circle_filled);
+ mAddUser.setIcon(centerAndTint(icon));
}
private void updateAddSupervisedUser(Context context) {
if (!TextUtils.isEmpty(mConfigSupervisedUserCreationPackage)) {
updateAddUserCommon(context, mAddSupervisedUser, false);
+ Drawable icon = context.getDrawable(R.drawable.ic_add_supervised_user);
+ mAddSupervisedUser.setIcon(centerAndTint(icon));
} else {
mAddSupervisedUser.setVisible(false);
}
@@ -1495,7 +1501,10 @@
LayerDrawable ld = new LayerDrawable(new Drawable[] {bg, icon});
int size = getContext().getResources().getDimensionPixelSize(
R.dimen.multiple_users_avatar_size);
+ int bgSize = getContext().getResources().getDimensionPixelSize(
+ R.dimen.multiple_users_user_icon_size);
ld.setLayerSize(1, size, size);
+ ld.setLayerSize(0, bgSize, bgSize);
ld.setLayerGravity(1, Gravity.CENTER);
return ld;