Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/StatusBarStateController.java +6 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,12 @@ public interface StatusBarStateController { default void onStateChanged(int newState) { } /** * Callback to be notified about upcoming state changes. Typically, is immediately followed * by #onStateChanged, unless there was an intentional delay in updating the state changed. */ default void onUpcomingStateChanged(int upcomingState) {} /** * Callback to be notified when Dozing changes. Dozing is stored separately from state. */ Loading packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java +13 −3 Original line number Diff line number Diff line Loading @@ -205,7 +205,7 @@ public class StatusBarStateControllerImpl implements } mLastState = mState; mState = state; mUpcomingState = state; updateUpcomingState(mState); mUiEventLogger.log(StatusBarStateEvent.fromState(mState)); Trace.instantForTrack(Trace.TRACE_TAG_APP, "UI Events", "StatusBarState " + tag); for (RankedListener rl : new ArrayList<>(mListeners)) { Loading @@ -223,8 +223,18 @@ public class StatusBarStateControllerImpl implements @Override public void setUpcomingState(int nextState) { mUpcomingState = nextState; recordHistoricalState(mUpcomingState /* newState */, mState /* lastState */, true); recordHistoricalState(nextState /* newState */, mState /* lastState */, true); updateUpcomingState(nextState); } private void updateUpcomingState(int upcomingState) { if (mUpcomingState != upcomingState) { mUpcomingState = upcomingState; for (RankedListener rl : new ArrayList<>(mListeners)) { rl.mListener.onUpcomingStateChanged(mUpcomingState); } } } @Override Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +10 −1 Original line number Diff line number Diff line Loading @@ -427,6 +427,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private boolean mInHeadsUpPinnedMode; private boolean mHeadsUpAnimatingAway; private int mStatusBarState; private int mUpcomingStatusBarState; private int mCachedBackgroundColor; private boolean mHeadsUpGoingAwayAnimationsAllowed = true; private Runnable mReflingAndAnimateScroll = () -> { Loading Loading @@ -690,7 +691,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mController.hasActiveClearableNotifications(ROWS_ALL); boolean showFooterView = (showDismissView || mController.getVisibleNotificationCount() > 0) && mIsCurrentUserSetup // see: b/193149550 && mStatusBarState != StatusBarState.KEYGUARD && !onKeyguard() && mUpcomingStatusBarState != StatusBarState.KEYGUARD // quick settings don't affect notifications when not in full screen && (mQsExpansionFraction != 1 || !mQsFullScreen) && !mScreenOffAnimationController.shouldHideNotificationsFooter() Loading Loading @@ -4960,6 +4962,13 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable updateDismissBehavior(); } void setUpcomingStatusBarState(int upcomingStatusBarState) { mUpcomingStatusBarState = upcomingStatusBarState; if (mUpcomingStatusBarState != mStatusBarState) { updateFooter(); } } void onStatePostChange(boolean fromShadeLocked) { boolean onKeyguard = onKeyguard(); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +5 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,11 @@ public class NotificationStackScrollLayoutController { mView.setStatusBarState(mBarState); } @Override public void onUpcomingStateChanged(int newState) { mView.setUpcomingStatusBarState(newState); } @Override public void onStatePostChange() { mView.updateSensitiveness(mStatusBarStateController.goingToFullShade(), Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/StatusBarStateController.java +6 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,12 @@ public interface StatusBarStateController { default void onStateChanged(int newState) { } /** * Callback to be notified about upcoming state changes. Typically, is immediately followed * by #onStateChanged, unless there was an intentional delay in updating the state changed. */ default void onUpcomingStateChanged(int upcomingState) {} /** * Callback to be notified when Dozing changes. Dozing is stored separately from state. */ Loading
packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java +13 −3 Original line number Diff line number Diff line Loading @@ -205,7 +205,7 @@ public class StatusBarStateControllerImpl implements } mLastState = mState; mState = state; mUpcomingState = state; updateUpcomingState(mState); mUiEventLogger.log(StatusBarStateEvent.fromState(mState)); Trace.instantForTrack(Trace.TRACE_TAG_APP, "UI Events", "StatusBarState " + tag); for (RankedListener rl : new ArrayList<>(mListeners)) { Loading @@ -223,8 +223,18 @@ public class StatusBarStateControllerImpl implements @Override public void setUpcomingState(int nextState) { mUpcomingState = nextState; recordHistoricalState(mUpcomingState /* newState */, mState /* lastState */, true); recordHistoricalState(nextState /* newState */, mState /* lastState */, true); updateUpcomingState(nextState); } private void updateUpcomingState(int upcomingState) { if (mUpcomingState != upcomingState) { mUpcomingState = upcomingState; for (RankedListener rl : new ArrayList<>(mListeners)) { rl.mListener.onUpcomingStateChanged(mUpcomingState); } } } @Override Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +10 −1 Original line number Diff line number Diff line Loading @@ -427,6 +427,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private boolean mInHeadsUpPinnedMode; private boolean mHeadsUpAnimatingAway; private int mStatusBarState; private int mUpcomingStatusBarState; private int mCachedBackgroundColor; private boolean mHeadsUpGoingAwayAnimationsAllowed = true; private Runnable mReflingAndAnimateScroll = () -> { Loading Loading @@ -690,7 +691,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mController.hasActiveClearableNotifications(ROWS_ALL); boolean showFooterView = (showDismissView || mController.getVisibleNotificationCount() > 0) && mIsCurrentUserSetup // see: b/193149550 && mStatusBarState != StatusBarState.KEYGUARD && !onKeyguard() && mUpcomingStatusBarState != StatusBarState.KEYGUARD // quick settings don't affect notifications when not in full screen && (mQsExpansionFraction != 1 || !mQsFullScreen) && !mScreenOffAnimationController.shouldHideNotificationsFooter() Loading Loading @@ -4960,6 +4962,13 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable updateDismissBehavior(); } void setUpcomingStatusBarState(int upcomingStatusBarState) { mUpcomingStatusBarState = upcomingStatusBarState; if (mUpcomingStatusBarState != mStatusBarState) { updateFooter(); } } void onStatePostChange(boolean fromShadeLocked) { boolean onKeyguard = onKeyguard(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +5 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,11 @@ public class NotificationStackScrollLayoutController { mView.setStatusBarState(mBarState); } @Override public void onUpcomingStateChanged(int newState) { mView.setUpcomingStatusBarState(newState); } @Override public void onStatePostChange() { mView.updateSensitiveness(mStatusBarStateController.goingToFullShade(), Loading