Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -435,7 +435,8 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle final int N = mListContainer.getContainerChildCount(); int visibleNotifications = 0; boolean onKeyguard = mStatusBarStateController.getState() == StatusBarState.KEYGUARD; boolean onKeyguard = mStatusBarStateController.getCurrentOrUpcomingState() == StatusBarState.KEYGUARD; Stack<ExpandableNotificationRow> stack = new Stack<>(); for (int i = N - 1; i >= 0; i--) { View child = mListContainer.getContainerChildAt(i); Loading packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java +12 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ public class StatusBarStateControllerImpl implements SysuiStatusBarStateControll private final UiEventLogger mUiEventLogger; private int mState; private int mLastState; private int mUpcomingState; private boolean mLeaveOpenOnKeyguardHide; private boolean mKeyguardRequested; Loading Loading @@ -169,6 +170,7 @@ public class StatusBarStateControllerImpl implements SysuiStatusBarStateControll } mLastState = mState; mState = state; mUpcomingState = state; mUiEventLogger.log(StatusBarStateEvent.fromState(mState)); for (RankedListener rl : new ArrayList<>(mListeners)) { rl.mListener.onStateChanged(mState); Loading @@ -183,6 +185,16 @@ public class StatusBarStateControllerImpl implements SysuiStatusBarStateControll return true; } @Override public void setUpcomingState(int nextState) { mUpcomingState = nextState; } @Override public int getCurrentOrUpcomingState() { return mUpcomingState; } @Override public boolean isDozing() { return mIsDozing; Loading packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java +14 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,20 @@ public interface SysuiStatusBarStateController extends StatusBarStateController */ boolean setState(int state, boolean force); /** * Provides a hint that the status bar has started to transition to another * {@link StatusBarState}. This suggests that a matching call to setState() with the same value * will happen in the near future, although that may not happen if the animation is canceled, * etc. */ void setUpcomingState(int state); /** * If the status bar is in the process of transitioning to a new state, returns that state. * Otherwise, returns the current state. */ int getCurrentOrUpcomingState(); /** * Update the dozing state from {@link StatusBar}'s perspective * @param isDozing well, are we dozing? Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +2 −0 Original line number Diff line number Diff line Loading @@ -4398,6 +4398,8 @@ public class NotificationPanelViewController extends PanelViewController { */ public void showAodUi() { setDozing(true /* dozing */, false /* animate */, null); mStatusBarStateController.setUpcomingState(KEYGUARD); mEntryManager.updateNotifications("showAodUi"); mStatusBarStateListener.onStateChanged(KEYGUARD); mStatusBarStateListener.onDozeAmountChanged(1f, 1f); setExpandedFraction(1f); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -435,7 +435,8 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle final int N = mListContainer.getContainerChildCount(); int visibleNotifications = 0; boolean onKeyguard = mStatusBarStateController.getState() == StatusBarState.KEYGUARD; boolean onKeyguard = mStatusBarStateController.getCurrentOrUpcomingState() == StatusBarState.KEYGUARD; Stack<ExpandableNotificationRow> stack = new Stack<>(); for (int i = N - 1; i >= 0; i--) { View child = mListContainer.getContainerChildAt(i); Loading
packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java +12 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ public class StatusBarStateControllerImpl implements SysuiStatusBarStateControll private final UiEventLogger mUiEventLogger; private int mState; private int mLastState; private int mUpcomingState; private boolean mLeaveOpenOnKeyguardHide; private boolean mKeyguardRequested; Loading Loading @@ -169,6 +170,7 @@ public class StatusBarStateControllerImpl implements SysuiStatusBarStateControll } mLastState = mState; mState = state; mUpcomingState = state; mUiEventLogger.log(StatusBarStateEvent.fromState(mState)); for (RankedListener rl : new ArrayList<>(mListeners)) { rl.mListener.onStateChanged(mState); Loading @@ -183,6 +185,16 @@ public class StatusBarStateControllerImpl implements SysuiStatusBarStateControll return true; } @Override public void setUpcomingState(int nextState) { mUpcomingState = nextState; } @Override public int getCurrentOrUpcomingState() { return mUpcomingState; } @Override public boolean isDozing() { return mIsDozing; Loading
packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java +14 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,20 @@ public interface SysuiStatusBarStateController extends StatusBarStateController */ boolean setState(int state, boolean force); /** * Provides a hint that the status bar has started to transition to another * {@link StatusBarState}. This suggests that a matching call to setState() with the same value * will happen in the near future, although that may not happen if the animation is canceled, * etc. */ void setUpcomingState(int state); /** * If the status bar is in the process of transitioning to a new state, returns that state. * Otherwise, returns the current state. */ int getCurrentOrUpcomingState(); /** * Update the dozing state from {@link StatusBar}'s perspective * @param isDozing well, are we dozing? Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +2 −0 Original line number Diff line number Diff line Loading @@ -4398,6 +4398,8 @@ public class NotificationPanelViewController extends PanelViewController { */ public void showAodUi() { setDozing(true /* dozing */, false /* animate */, null); mStatusBarStateController.setUpcomingState(KEYGUARD); mEntryManager.updateNotifications("showAodUi"); mStatusBarStateListener.onStateChanged(KEYGUARD); mStatusBarStateListener.onDozeAmountChanged(1f, 1f); setExpandedFraction(1f); Loading