Fix notifications showing on keyguard

The root cause here is that some components
(NotificationKeyguardUserManager, NotificationStackScrollLayout,
NotificationShelf) have subtle dependencies about how they update based
on StatusBarState which used to be satisfied. When we migrated to
StatusBarStateController the dependencies were broken sometimes.

The fix here is multifactorial:
    1. Introduce a ranking to StatusBarStateController listeners so that
    we can unwind the dependencies for now. (This should be fixed
    long-term)

    2. Move NSSL's actual notification updating to a new
    onStatePostChange() method of the listeners

    3. Explicitly call updatePublicMode() when hiding the
    keyguard because SbStateController does not give callbacks when
    setting a state to the same value.

Will move updatePublicMode into NotificationKeyguardUserManager in a
later commit to reduce the surface area here.

Bug: 115739177
Change-Id: I97786619a1843922aeedcdb51e067a7c46cacaec
Fixes: 114297820
Test: manual
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowController.java
index 167bba6..200964c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowController.java
@@ -93,7 +93,8 @@
         mKeyguardScreenRotation = shouldEnableKeyguardScreenRotation();
         mDozeParameters = dozeParameters;
         mScreenBrightnessDoze = mDozeParameters.getScreenBrightnessDoze();
-        Dependency.get(StatusBarStateController.class).addListener(mStateListener);
+        Dependency.get(StatusBarStateController.class).addListener(
+                mStateListener, StatusBarStateController.RANK_STATUS_BAR_WINDOW_CONTROLLER);
         Dependency.get(ConfigurationController.class).addCallback(this);
     }