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
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java b/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java
index 488fc03..2473335 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSFooter.java
@@ -45,6 +45,7 @@
 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 @@
     @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);