Fix events so that VisualStabilityCoordinator blocks shade recalculation during activity launch animation

Bug: 230540148
Bug: 227254780
Test: atest VisualStabilityCoordinatorTest
Change-Id: Iacb95f8be09acf31faea7f71c4580dbb9fdc0825
This commit is contained in:
Jeff DeCew
2022-05-09 19:37:23 +00:00
parent 221212c6f1
commit 8b63613104
2 changed files with 6 additions and 3 deletions

View File

@@ -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);
}
}

View File

@@ -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)
}
}