From 8b63613104f90500f54d1a8829766e4547d1697f Mon Sep 17 00:00:00 2001 From: Jeff DeCew Date: Mon, 9 May 2022 19:37:23 +0000 Subject: [PATCH] Fix events so that VisualStabilityCoordinator blocks shade recalculation during activity launch animation Bug: 230540148 Bug: 227254780 Test: atest VisualStabilityCoordinatorTest Change-Id: Iacb95f8be09acf31faea7f71c4580dbb9fdc0825 --- .../statusbar/phone/NotificationPanelViewController.java | 4 ++-- .../statusbar/phone/StatusBarLaunchAnimatorController.kt | 5 ++++- 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 f15ea627af479..314ab2221b198 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 56b6dfc42ee35..c0922163903fe 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