Merge "Hide manage & clear affordances on transition to KG" into tm-dev am: 0340a16437
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17537087 Change-Id: Ifd51e871f026d3cc6efb116dbefa068792f302fd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -93,6 +93,12 @@ public interface StatusBarStateController {
|
|||||||
default void onStateChanged(int newState) {
|
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.
|
* Callback to be notified when Dozing changes. Dozing is stored separately from state.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ public class StatusBarStateControllerImpl implements
|
|||||||
}
|
}
|
||||||
mLastState = mState;
|
mLastState = mState;
|
||||||
mState = state;
|
mState = state;
|
||||||
mUpcomingState = state;
|
updateUpcomingState(mState);
|
||||||
mUiEventLogger.log(StatusBarStateEvent.fromState(mState));
|
mUiEventLogger.log(StatusBarStateEvent.fromState(mState));
|
||||||
Trace.instantForTrack(Trace.TRACE_TAG_APP, "UI Events", "StatusBarState " + tag);
|
Trace.instantForTrack(Trace.TRACE_TAG_APP, "UI Events", "StatusBarState " + tag);
|
||||||
for (RankedListener rl : new ArrayList<>(mListeners)) {
|
for (RankedListener rl : new ArrayList<>(mListeners)) {
|
||||||
@@ -223,8 +223,18 @@ public class StatusBarStateControllerImpl implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setUpcomingState(int nextState) {
|
public void setUpcomingState(int nextState) {
|
||||||
mUpcomingState = nextState;
|
recordHistoricalState(nextState /* newState */, mState /* lastState */, true);
|
||||||
recordHistoricalState(mUpcomingState /* 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
|
@Override
|
||||||
|
|||||||
@@ -427,6 +427,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
|||||||
private boolean mInHeadsUpPinnedMode;
|
private boolean mInHeadsUpPinnedMode;
|
||||||
private boolean mHeadsUpAnimatingAway;
|
private boolean mHeadsUpAnimatingAway;
|
||||||
private int mStatusBarState;
|
private int mStatusBarState;
|
||||||
|
private int mUpcomingStatusBarState;
|
||||||
private int mCachedBackgroundColor;
|
private int mCachedBackgroundColor;
|
||||||
private boolean mHeadsUpGoingAwayAnimationsAllowed = true;
|
private boolean mHeadsUpGoingAwayAnimationsAllowed = true;
|
||||||
private Runnable mReflingAndAnimateScroll = () -> {
|
private Runnable mReflingAndAnimateScroll = () -> {
|
||||||
@@ -690,7 +691,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
|||||||
mController.hasActiveClearableNotifications(ROWS_ALL);
|
mController.hasActiveClearableNotifications(ROWS_ALL);
|
||||||
boolean showFooterView = (showDismissView || mController.getVisibleNotificationCount() > 0)
|
boolean showFooterView = (showDismissView || mController.getVisibleNotificationCount() > 0)
|
||||||
&& mIsCurrentUserSetup // see: b/193149550
|
&& mIsCurrentUserSetup // see: b/193149550
|
||||||
&& mStatusBarState != StatusBarState.KEYGUARD
|
&& !onKeyguard()
|
||||||
|
&& mUpcomingStatusBarState != StatusBarState.KEYGUARD
|
||||||
// quick settings don't affect notifications when not in full screen
|
// quick settings don't affect notifications when not in full screen
|
||||||
&& (mQsExpansionFraction != 1 || !mQsFullScreen)
|
&& (mQsExpansionFraction != 1 || !mQsFullScreen)
|
||||||
&& !mScreenOffAnimationController.shouldHideNotificationsFooter()
|
&& !mScreenOffAnimationController.shouldHideNotificationsFooter()
|
||||||
@@ -4960,6 +4962,13 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
|||||||
updateDismissBehavior();
|
updateDismissBehavior();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setUpcomingStatusBarState(int upcomingStatusBarState) {
|
||||||
|
mUpcomingStatusBarState = upcomingStatusBarState;
|
||||||
|
if (mUpcomingStatusBarState != mStatusBarState) {
|
||||||
|
updateFooter();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void onStatePostChange(boolean fromShadeLocked) {
|
void onStatePostChange(boolean fromShadeLocked) {
|
||||||
boolean onKeyguard = onKeyguard();
|
boolean onKeyguard = onKeyguard();
|
||||||
|
|
||||||
|
|||||||
@@ -309,6 +309,11 @@ public class NotificationStackScrollLayoutController {
|
|||||||
mView.setStatusBarState(mBarState);
|
mView.setStatusBarState(mBarState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUpcomingStateChanged(int newState) {
|
||||||
|
mView.setUpcomingStatusBarState(newState);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStatePostChange() {
|
public void onStatePostChange() {
|
||||||
mView.updateSensitiveness(mStatusBarStateController.goingToFullShade(),
|
mView.updateSensitiveness(mStatusBarStateController.goingToFullShade(),
|
||||||
|
|||||||
Reference in New Issue
Block a user