diff options
| author | 2022-05-09 19:37:23 +0000 | |
|---|---|---|
| committer | 2022-05-12 11:16:54 +0000 | |
| commit | 8b63613104f90500f54d1a8829766e4547d1697f (patch) | |
| tree | 69b593e32c37417e957696c7068826572905eb25 | |
| parent | 221212c6f1d2a6c6b44c082a0fbc9c72563d90e8 (diff) | |
Fix events so that VisualStabilityCoordinator blocks shade recalculation during activity launch animation
Bug: 230540148
Bug: 227254780
Test: atest VisualStabilityCoordinatorTest
Change-Id: Iacb95f8be09acf31faea7f71c4580dbb9fdc0825
2 files changed, 6 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index f15ea627af47..314ab2221b19 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -3377,9 +3377,9 @@ public class NotificationPanelViewController extends PanelViewController { @Override public void setIsLaunchAnimationRunning(boolean running) { - boolean wasRunning = isLaunchTransitionRunning(); + boolean wasRunning = mIsLaunchAnimationRunning; super.setIsLaunchAnimationRunning(running); - if (wasRunning != isLaunchTransitionRunning()) { + if (wasRunning != mIsLaunchAnimationRunning) { mPanelEventsEmitter.notifyLaunchingActivityChanged(running); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt index 56b6dfc42ee3..c0922163903f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt @@ -20,7 +20,9 @@ class StatusBarLaunchAnimatorController( override fun onIntentStarted(willAnimate: Boolean) { delegate.onIntentStarted(willAnimate) - if (!willAnimate) { + if (willAnimate) { + centralSurfaces.notificationPanelViewController.setIsLaunchAnimationRunning(true) + } else { centralSurfaces.collapsePanelOnMainThread() } } @@ -51,6 +53,7 @@ class StatusBarLaunchAnimatorController( override fun onLaunchAnimationCancelled() { delegate.onLaunchAnimationCancelled() + centralSurfaces.notificationPanelViewController.setIsLaunchAnimationRunning(false) centralSurfaces.onLaunchAnimationCancelled(isLaunchForActivity) } }
\ No newline at end of file |