summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-05-29 20:09:24 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-05-29 20:09:24 +0000
commit3924bc3dca351686268e3e4680c0afc134dad01b (patch)
tree4a9b21e33f34a61d9183f1cf10b3daba8b4404f3
parent49d74e701f16dee3c97b08ee0c549b64ab6459a1 (diff)
parent853ae8c67e53d8fe0acc37ae78631f7adacf5dcd (diff)
Merge "Add color change listener to NSSL" into rvc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java10
1 files changed, 7 insertions, 3 deletions
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 fc203a0d857f..325c8c0e506a 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
@@ -535,6 +535,12 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
private int mWaterfallTopInset;
+ private SysuiColorExtractor.OnColorsChangedListener mOnColorsChangedListener =
+ (colorExtractor, which) -> {
+ final boolean useDarkText = mColorExtractor.getNeutralColors().supportsDarkText();
+ updateDecorViews(useDarkText);
+ };
+
@Inject
public NotificationStackScrollLayout(
@Named(VIEW_CONTEXT) Context context,
@@ -662,6 +668,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
mStatusbarStateController = statusBarStateController;
initializeForegroundServiceSection(fgsFeatureController);
mUiEventLogger = uiEventLogger;
+ mColorExtractor.addOnColorsChangedListener(mOnColorsChangedListener);
}
private void initializeForegroundServiceSection(
@@ -728,9 +735,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
@Override
@ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
public void onThemeChanged() {
- final boolean useDarkText = mColorExtractor.getNeutralColors().supportsDarkText();
- updateDecorViews(useDarkText);
-
updateFooter();
}