OSDN Git Service

Fixes an issue where certain notification icons were not tinted
authorSelim Cinek <cinek@google.com>
Tue, 29 Jan 2019 21:08:23 +0000 (13:08 -0800)
committerSelim Cinek <cinek@google.com>
Tue, 29 Jan 2019 21:08:23 +0000 (13:08 -0800)
A few Drawables are not handling an update to a color matrix properly
when its set as a color filter. As a result we now unset and reset the
filter when changed.

Change-Id: I905c516ba365d89bfc552f6b30cfcbc51a0965e8
Fixes: 111853077

packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java

index 19ed13e..acacc8f 100644 (file)
@@ -594,8 +594,8 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
                     mCurrentSetColor, Color.WHITE, mDarkAmount);
             updateTintMatrix(mMatrix, color, DARK_ALPHA_BOOST * mDarkAmount);
             mMatrixColorFilter.setColorMatrixArray(mMatrix);
+            setColorFilter(null);  // setColorFilter only invalidates if the instance changed.
             setColorFilter(mMatrixColorFilter);
-            invalidate();  // setColorFilter only invalidates if the filter instance changed.
         } else {
             mDozer.updateGrayscale(this, mDarkAmount);
         }