summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Julia Tuttle <juliatuttle@google.com> 2022-01-26 11:23:45 -0500
committer Julia Tuttle <juliatuttle@google.com> 2022-01-31 13:02:07 -0500
commitee5282e637e75f33c4e9cb616524f0e02cdae70a (patch)
treecce61490b0391cc53fb0fecba61e60e644090342
parenta0280632840e2ae9acefd17fe2e35b7d344b3082 (diff)
New Pipeline: check initial keyguard state
The KeyguardCoordinator is responsible for paying attention to the keyguard state and updating the SectionHeaderVisibilityProvider correspondingly. Instead of assuming we boot to the keyguard, and therefore that section headers should be hidden, check the keyguard state and update the header visibility when the coordinator attaches to the pipeline. Bug: 216288085 Test: manual Change-Id: Ic6e032043388070b4a162e57d84b9fe2ed6fbf46
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.java
index 0ce07cb99d52..361f44e0c4b9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.java
@@ -98,6 +98,8 @@ public class KeyguardCoordinator implements Coordinator {
setupInvalidateNotifListCallbacks();
// Filter at the "finalize" stage so that views remain bound by PreparationCoordinator
pipeline.addFinalizeFilter(mNotifFilter);
+
+ updateSectionHeadersVisibility();
}
private final NotifFilter mNotifFilter = new NotifFilter(TAG) {
@@ -220,10 +222,7 @@ public class KeyguardCoordinator implements Coordinator {
}
private void invalidateListFromFilter(String reason) {
- boolean onKeyguard = mStatusBarStateController.getState() == StatusBarState.KEYGUARD;
- boolean neverShowSections = mSectionHeaderVisibilityProvider.getNeverShowSectionHeaders();
- boolean showSections = !onKeyguard && !neverShowSections;
- mSectionHeaderVisibilityProvider.setSectionHeadersVisible(showSections);
+ updateSectionHeadersVisibility();
mNotifFilter.invalidateList();
}
@@ -235,6 +234,13 @@ public class KeyguardCoordinator implements Coordinator {
1) == 0;
}
+ private void updateSectionHeadersVisibility() {
+ boolean onKeyguard = mStatusBarStateController.getState() == StatusBarState.KEYGUARD;
+ boolean neverShowSections = mSectionHeaderVisibilityProvider.getNeverShowSectionHeaders();
+ boolean showSections = !onKeyguard && !neverShowSections;
+ mSectionHeaderVisibilityProvider.setSectionHeadersVisible(showSections);
+ }
+
private final KeyguardStateController.Callback mKeyguardCallback =
new KeyguardStateController.Callback() {
@Override