Merge "Fix notifications count change during animation on keyguard" into tm-dev am: 4f81748bbf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17665785 Change-Id: I512de93816c564f68dfe0a34da98c272ff86fb53 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -338,6 +338,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
private boolean mAnimateNextPositionUpdate;
|
private boolean mAnimateNextPositionUpdate;
|
||||||
private float mQuickQsHeaderHeight;
|
private float mQuickQsHeaderHeight;
|
||||||
private ScreenOffAnimationController mScreenOffAnimationController;
|
private ScreenOffAnimationController mScreenOffAnimationController;
|
||||||
|
private UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;
|
||||||
|
|
||||||
private int mTrackingPointer;
|
private int mTrackingPointer;
|
||||||
private VelocityTracker mQsVelocityTracker;
|
private VelocityTracker mQsVelocityTracker;
|
||||||
@@ -745,7 +746,8 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
KeyguardUnlockAnimationController keyguardUnlockAnimationController,
|
KeyguardUnlockAnimationController keyguardUnlockAnimationController,
|
||||||
NotificationListContainer notificationListContainer,
|
NotificationListContainer notificationListContainer,
|
||||||
PanelEventsEmitter panelEventsEmitter,
|
PanelEventsEmitter panelEventsEmitter,
|
||||||
NotificationStackSizeCalculator notificationStackSizeCalculator) {
|
NotificationStackSizeCalculator notificationStackSizeCalculator,
|
||||||
|
UnlockedScreenOffAnimationController unlockedScreenOffAnimationController) {
|
||||||
super(view,
|
super(view,
|
||||||
falsingManager,
|
falsingManager,
|
||||||
dozeLog,
|
dozeLog,
|
||||||
@@ -846,6 +848,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
mAuthController = authController;
|
mAuthController = authController;
|
||||||
mLockIconViewController = lockIconViewController;
|
mLockIconViewController = lockIconViewController;
|
||||||
mScreenOffAnimationController = screenOffAnimationController;
|
mScreenOffAnimationController = screenOffAnimationController;
|
||||||
|
mUnlockedScreenOffAnimationController = unlockedScreenOffAnimationController;
|
||||||
mRemoteInputManager = remoteInputManager;
|
mRemoteInputManager = remoteInputManager;
|
||||||
|
|
||||||
int currentMode = navigationModeController.addListener(
|
int currentMode = navigationModeController.addListener(
|
||||||
@@ -1251,6 +1254,10 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean shouldAvoidChangingNotificationsCount() {
|
||||||
|
return mHintAnimationRunning || mUnlockedScreenOffAnimationController.isAnimationPlaying();
|
||||||
|
}
|
||||||
|
|
||||||
public void setKeyguardIndicationController(KeyguardIndicationController indicationController) {
|
public void setKeyguardIndicationController(KeyguardIndicationController indicationController) {
|
||||||
mKeyguardIndicationController = indicationController;
|
mKeyguardIndicationController = indicationController;
|
||||||
mKeyguardIndicationController.setIndicationArea(mKeyguardBottomArea);
|
mKeyguardIndicationController.setIndicationArea(mKeyguardBottomArea);
|
||||||
@@ -4733,7 +4740,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
int oldTop, int oldRight, int oldBottom) {
|
int oldTop, int oldRight, int oldBottom) {
|
||||||
DejankUtils.startDetectingBlockingIpcs("NVP#onLayout");
|
DejankUtils.startDetectingBlockingIpcs("NVP#onLayout");
|
||||||
super.onLayoutChange(v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom);
|
super.onLayoutChange(v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom);
|
||||||
updateMaxDisplayedNotifications(true);
|
updateMaxDisplayedNotifications(!shouldAvoidChangingNotificationsCount());
|
||||||
setIsFullWidth(mNotificationStackScrollLayoutController.getWidth() == mView.getWidth());
|
setIsFullWidth(mNotificationStackScrollLayoutController.getWidth() == mView.getWidth());
|
||||||
|
|
||||||
// Update Clock Pivot
|
// Update Clock Pivot
|
||||||
|
|||||||
@@ -331,6 +331,8 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
private NotificationListContainer mNotificationListContainer;
|
private NotificationListContainer mNotificationListContainer;
|
||||||
@Mock
|
@Mock
|
||||||
private NotificationStackSizeCalculator mNotificationStackSizeCalculator;
|
private NotificationStackSizeCalculator mNotificationStackSizeCalculator;
|
||||||
|
@Mock
|
||||||
|
private UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;
|
||||||
private NotificationPanelViewController.PanelEventsEmitter mPanelEventsEmitter;
|
private NotificationPanelViewController.PanelEventsEmitter mPanelEventsEmitter;
|
||||||
private Optional<SysUIUnfoldComponent> mSysUIUnfoldComponent = Optional.empty();
|
private Optional<SysUIUnfoldComponent> mSysUIUnfoldComponent = Optional.empty();
|
||||||
private SysuiStatusBarStateController mStatusBarStateController;
|
private SysuiStatusBarStateController mStatusBarStateController;
|
||||||
@@ -511,7 +513,8 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
mKeyguardUnlockAnimationController,
|
mKeyguardUnlockAnimationController,
|
||||||
mNotificationListContainer,
|
mNotificationListContainer,
|
||||||
mPanelEventsEmitter,
|
mPanelEventsEmitter,
|
||||||
mNotificationStackSizeCalculator);
|
mNotificationStackSizeCalculator,
|
||||||
|
mUnlockedScreenOffAnimationController);
|
||||||
mNotificationPanelViewController.initDependencies(
|
mNotificationPanelViewController.initDependencies(
|
||||||
mCentralSurfaces,
|
mCentralSurfaces,
|
||||||
() -> {},
|
() -> {},
|
||||||
|
|||||||
Reference in New Issue
Block a user