Fix QS user icon in guest mode
When the profile is updated in guest mode, the user icon in QS footer is not displayed correctly. To fix this issue, the tinting of guest icon is applied only when the drawable is not UserIconDrawable. Fixes: 65148947 Test: manual - switch to guest and update the profile. Change-Id: I9690e9fd286703a25ee08d877c3dd7f4729e2b31
This commit is contained in:
committed by
Yoshinori Hirano
parent
edb2e0c722
commit
23fdba10d2
@@ -45,6 +45,7 @@ import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.keyguard.KeyguardStatusView;
|
||||
import com.android.settingslib.Utils;
|
||||
import com.android.settingslib.drawable.UserIconDrawable;
|
||||
import com.android.systemui.Dependency;
|
||||
import com.android.systemui.FontSizeUtils;
|
||||
import com.android.systemui.R;
|
||||
@@ -427,8 +428,9 @@ public class QSFooter extends FrameLayout implements
|
||||
@Override
|
||||
public void onUserInfoChanged(String name, Drawable picture, String userAccount) {
|
||||
if (picture != null &&
|
||||
UserManager.get(mContext).isGuestUser(ActivityManager.getCurrentUser())) {
|
||||
picture = picture.getConstantState().newDrawable().mutate();
|
||||
UserManager.get(mContext).isGuestUser(ActivityManager.getCurrentUser()) &&
|
||||
!(picture instanceof UserIconDrawable)) {
|
||||
picture = picture.getConstantState().newDrawable(mContext.getResources()).mutate();
|
||||
picture.setColorFilter(
|
||||
Utils.getColorAttr(mContext, android.R.attr.colorForeground),
|
||||
Mode.SRC_IN);
|
||||
|
||||
Reference in New Issue
Block a user