diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java index 27da6fddf5d0c..0faad210b0394 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java @@ -244,6 +244,9 @@ public class NotificationContentView extends FrameLayout { public void notifyContentUpdated() { selectLayout(false /* animate */, true /* force */); + if (mContractedChild != null) { + mContractedWrapper.setDark(mDark, false /* animate */, 0 /* delay */); + } } public boolean isContentExpandable() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationCustomViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationCustomViewWrapper.java index 045be3e32200e..0702d7ed6e6eb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationCustomViewWrapper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationCustomViewWrapper.java @@ -27,7 +27,6 @@ import com.android.systemui.statusbar.phone.NotificationPanelView; public class NotificationCustomViewWrapper extends NotificationViewWrapper { private final ViewInvertHelper mInvertHelper; - private boolean mDark; protected NotificationCustomViewWrapper(View view) { super(view); @@ -36,13 +35,10 @@ public class NotificationCustomViewWrapper extends NotificationViewWrapper { @Override public void setDark(boolean dark, boolean fade, long delay) { - if (mDark != dark) { - mDark = dark; - if (fade) { - mInvertHelper.fade(dark, delay); - } else { - mInvertHelper.update(dark); - } + if (fade) { + mInvertHelper.fade(dark, delay); + } else { + mInvertHelper.update(dark); } } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaViewWrapper.java index 8f63a79063868..953c373c47e97 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaViewWrapper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaViewWrapper.java @@ -24,19 +24,14 @@ import android.view.View; */ public class NotificationMediaViewWrapper extends NotificationTemplateViewWrapper { - private boolean mDark; - protected NotificationMediaViewWrapper(Context ctx, View view) { super(ctx, view); } @Override public void setDark(boolean dark, boolean fade, long delay) { - if (mDark != dark) { - mDark = dark; - // Only update the large icon, because the rest is already inverted. - setPictureGrayscale(dark, fade, delay); - } + // Only update the large icon, because the rest is already inverted. + setPictureGrayscale(dark, fade, delay); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java index 8dc14b0d95049..5b6e1cd6a9efb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java @@ -51,8 +51,6 @@ public class NotificationTemplateViewWrapper extends NotificationViewWrapper { private final int mIconBackgroundDarkColor; private final Interpolator mLinearOutSlowInInterpolator; - private boolean mDark; - protected NotificationTemplateViewWrapper(Context ctx, View view) { super(view); mIconDarkAlpha = ctx.getResources().getInteger(R.integer.doze_small_icon_alpha); @@ -95,26 +93,23 @@ public class NotificationTemplateViewWrapper extends NotificationViewWrapper { @Override public void setDark(boolean dark, boolean fade, long delay) { - if (mDark != dark) { - mDark = dark; - if (mInvertHelper != null) { - if (fade) { - mInvertHelper.fade(dark, delay); - } else { - mInvertHelper.update(dark); - } + if (mInvertHelper != null) { + if (fade) { + mInvertHelper.fade(dark, delay); + } else { + mInvertHelper.update(dark); } - if (mIcon != null) { - if (fade) { - fadeIconColorFilter(mIcon, dark, delay); - fadeIconAlpha(mIcon, dark, delay); - } else { - updateIconColorFilter(mIcon, dark); - updateIconAlpha(mIcon, dark); - } - } - setPictureGrayscale(dark, fade, delay); } + if (mIcon != null) { + if (fade) { + fadeIconColorFilter(mIcon, dark, delay); + fadeIconAlpha(mIcon, dark, delay); + } else { + updateIconColorFilter(mIcon, dark); + updateIconAlpha(mIcon, dark); + } + } + setPictureGrayscale(dark, fade, delay); } protected void setPictureGrayscale(boolean grayscale, boolean fade, long delay) {