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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user