diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java index 20efa32d63c6f..d2ddd212bda69 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java @@ -1002,10 +1002,6 @@ public class NotificationShelf extends ActivatableNotificationView implements return false; } - public void onUiModeChanged() { - updateBackgroundColors(); - } - public void setController(NotificationShelfController notificationShelfController) { mController = notificationShelfController; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java index 724921b3f7c8b..31d052d759980 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java @@ -191,7 +191,10 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView initDimens(); } - protected void updateBackgroundColors() { + /** + * Reload background colors from resources and invalidate views. + */ + public void updateBackgroundColors() { updateColors(); initBackground(); updateBackgroundTint(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index 76925a7eceee6..417ff5e9aed05 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -626,7 +626,12 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mBgColor = Utils.getColorAttr(mContext, android.R.attr.colorBackgroundFloating) .getDefaultColor(); updateBackgroundDimming(); - mShelf.onUiModeChanged(); + for (int i = 0; i < getChildCount(); i++) { + View child = getChildAt(i); + if (child instanceof ActivatableNotificationView) { + ((ActivatableNotificationView) child).updateBackgroundColors(); + } + } } @ShadeViewRefactor(RefactorComponent.DECORATOR) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java index a51674280c1c5..399702869d704 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java @@ -223,6 +223,7 @@ public class NotificationStackScrollLayoutController { updateShowEmptyShadeView(); mView.updateCornerRadius(); mView.updateBgColor(); + mView.updateDecorViews(); mView.reinflateViews(); }