Loading packages/SystemUI/res/values-night/colors.xml +0 −2 Original line number Diff line number Diff line Loading @@ -92,8 +92,6 @@ <color name="kg_user_switcher_avatar_icon_color">@android:color/background_light</color> <!-- Icon color for selected user avatars in keyguard user switcher --> <color name="kg_user_switcher_selected_avatar_icon_color">#202124</color> <!-- Color of background circle of user avatars in keyguard user switcher --> <color name="kg_user_switcher_avatar_background">#3C4043</color> <!-- Icon color for user avatars in quick settings user switcher --> <color name="qs_user_switcher_avatar_icon_color">@android:color/background_light</color> <!-- Icon color for selected user avatars in quick settings user switcher --> Loading packages/SystemUI/res/values/colors.xml +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ (e.g. cannot be switched to) --> <color name="kg_user_switcher_restricted_avatar_icon_color">@color/GM2_grey_600</color> <!-- Color of background circle of user avatars in keyguard user switcher --> <color name="kg_user_switcher_avatar_background">@color/GM2_grey_300</color> <color name="kg_user_switcher_avatar_background">?android:attr/colorBackgroundFloating</color> <!-- Icon color for user avatars in user switcher quick settings --> <color name="qs_user_switcher_avatar_icon_color">#3C4043</color> Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardQsUserSwitchController.java +18 −24 Original line number Diff line number Diff line Loading @@ -224,35 +224,29 @@ public class KeyguardQsUserSwitchController extends ViewController<UserAvatarVie mView.setContentDescription(contentDescription); } if (mCurrentUser.picture == null) { mView.setDrawableWithBadge(getDrawable(mCurrentUser).mutate(), mCurrentUser.resolveId()); } else { int avatarSize = (int) mResources.getDimension(R.dimen.kg_framed_avatar_size); Drawable drawable = new CircleFramedDrawable(mCurrentUser.picture, avatarSize); drawable.setColorFilter( mCurrentUser.isSwitchToEnabled ? null : mAdapter.getDisabledUserAvatarColorFilter()); mView.setDrawableWithBadge(drawable, mCurrentUser.info.id); } mView.setDrawableWithBadge(getCurrentUserIcon().mutate(), mCurrentUser.resolveId()); } Drawable getDrawable(UserSwitcherController.UserRecord item) { Drawable getCurrentUserIcon() { Drawable drawable; if (item.isCurrent && item.isGuest) { if (mCurrentUser.picture == null) { if (mCurrentUser.isCurrent && mCurrentUser.isGuest) { drawable = mContext.getDrawable(R.drawable.ic_avatar_guest_user); } else { drawable = mAdapter.getIconDrawable(mContext, item); drawable = mAdapter.getIconDrawable(mContext, mCurrentUser); } int iconColorRes; if (item.isSwitchToEnabled) { if (mCurrentUser.isSwitchToEnabled) { iconColorRes = R.color.kg_user_switcher_avatar_icon_color; } else { iconColorRes = R.color.kg_user_switcher_restricted_avatar_icon_color; } drawable.setTint(mResources.getColor(iconColorRes, mContext.getTheme())); } else { int avatarSize = (int) mResources.getDimension(R.dimen.kg_framed_avatar_size); drawable = new CircleFramedDrawable(mCurrentUser.picture, avatarSize); } Drawable bg = mContext.getDrawable(R.drawable.kg_bg_avatar); drawable = new LayerDrawable(new Drawable[]{bg, drawable}); Loading Loading
packages/SystemUI/res/values-night/colors.xml +0 −2 Original line number Diff line number Diff line Loading @@ -92,8 +92,6 @@ <color name="kg_user_switcher_avatar_icon_color">@android:color/background_light</color> <!-- Icon color for selected user avatars in keyguard user switcher --> <color name="kg_user_switcher_selected_avatar_icon_color">#202124</color> <!-- Color of background circle of user avatars in keyguard user switcher --> <color name="kg_user_switcher_avatar_background">#3C4043</color> <!-- Icon color for user avatars in quick settings user switcher --> <color name="qs_user_switcher_avatar_icon_color">@android:color/background_light</color> <!-- Icon color for selected user avatars in quick settings user switcher --> Loading
packages/SystemUI/res/values/colors.xml +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ (e.g. cannot be switched to) --> <color name="kg_user_switcher_restricted_avatar_icon_color">@color/GM2_grey_600</color> <!-- Color of background circle of user avatars in keyguard user switcher --> <color name="kg_user_switcher_avatar_background">@color/GM2_grey_300</color> <color name="kg_user_switcher_avatar_background">?android:attr/colorBackgroundFloating</color> <!-- Icon color for user avatars in user switcher quick settings --> <color name="qs_user_switcher_avatar_icon_color">#3C4043</color> Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardQsUserSwitchController.java +18 −24 Original line number Diff line number Diff line Loading @@ -224,35 +224,29 @@ public class KeyguardQsUserSwitchController extends ViewController<UserAvatarVie mView.setContentDescription(contentDescription); } if (mCurrentUser.picture == null) { mView.setDrawableWithBadge(getDrawable(mCurrentUser).mutate(), mCurrentUser.resolveId()); } else { int avatarSize = (int) mResources.getDimension(R.dimen.kg_framed_avatar_size); Drawable drawable = new CircleFramedDrawable(mCurrentUser.picture, avatarSize); drawable.setColorFilter( mCurrentUser.isSwitchToEnabled ? null : mAdapter.getDisabledUserAvatarColorFilter()); mView.setDrawableWithBadge(drawable, mCurrentUser.info.id); } mView.setDrawableWithBadge(getCurrentUserIcon().mutate(), mCurrentUser.resolveId()); } Drawable getDrawable(UserSwitcherController.UserRecord item) { Drawable getCurrentUserIcon() { Drawable drawable; if (item.isCurrent && item.isGuest) { if (mCurrentUser.picture == null) { if (mCurrentUser.isCurrent && mCurrentUser.isGuest) { drawable = mContext.getDrawable(R.drawable.ic_avatar_guest_user); } else { drawable = mAdapter.getIconDrawable(mContext, item); drawable = mAdapter.getIconDrawable(mContext, mCurrentUser); } int iconColorRes; if (item.isSwitchToEnabled) { if (mCurrentUser.isSwitchToEnabled) { iconColorRes = R.color.kg_user_switcher_avatar_icon_color; } else { iconColorRes = R.color.kg_user_switcher_restricted_avatar_icon_color; } drawable.setTint(mResources.getColor(iconColorRes, mContext.getTheme())); } else { int avatarSize = (int) mResources.getDimension(R.dimen.kg_framed_avatar_size); drawable = new CircleFramedDrawable(mCurrentUser.picture, avatarSize); } Drawable bg = mContext.getDrawable(R.drawable.kg_bg_avatar); drawable = new LayerDrawable(new Drawable[]{bg, drawable}); Loading