Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25369442 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "New Pipeline: check initial keyguard state"

parents 3cef8c7f ee5282e6
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -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