From 7e5594928c46e0ae3cd1246fdf94906f747b93b0 Mon Sep 17 00:00:00 2001 From: Robin Lee Date: Wed, 5 Apr 2023 11:03:40 +0200 Subject: [PATCH] Remove keyguard state from onAnimationCancelled Reason for revert: b/276433230 Test: atest CtsWindowManagerDeviceTestCases:KeyguardTests Test: atest PowerKeyGestureTests Bug: 276433230 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:11e6fdd982ab7e6df951dcfe97948f81a8f36d75) Merged-In: I62d760206dfd13ba4de7a77d2906b0f90bd2c343 Change-Id: I62d760206dfd13ba4de7a77d2906b0f90bd2c343 --- .../android/launcher3/LauncherAnimationRunner.java | 12 ++++-------- .../launcher3/QuickstepTransitionManager.java | 4 ++-- .../quickstep/LauncherBackAnimationController.java | 2 +- .../quickstep/util/SplitSelectStateController.java | 2 +- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/quickstep/src/com/android/launcher3/LauncherAnimationRunner.java b/quickstep/src/com/android/launcher3/LauncherAnimationRunner.java index 9f9f2c8654..18fe30d81d 100644 --- a/quickstep/src/com/android/launcher3/LauncherAnimationRunner.java +++ b/quickstep/src/com/android/launcher3/LauncherAnimationRunner.java @@ -120,7 +120,7 @@ public class LauncherAnimationRunner extends RemoteAnimationRunnerCompat { */ @BinderThread @Override - public void onAnimationCancelled(boolean isKeyguardOccluded) { + public void onAnimationCancelled() { postAsyncCallback(mHandler, () -> { finishExistingAnimation(); getFactory().onAnimationCancelled(); @@ -235,16 +235,12 @@ public class LauncherAnimationRunner extends RemoteAnimationRunnerCompat { RemoteAnimationTarget[] nonAppTargets, LauncherAnimationRunner.AnimationResult result); - @Override - @UiThread - default void onAnimationCancelled(boolean isKeyguardOccluded) { - onAnimationCancelled(); - } - /** * Called when the animation is cancelled. This can happen with or without * the create being called. */ - default void onAnimationCancelled() { } + @Override + @UiThread + default void onAnimationCancelled() {} } } diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index 7eecb291ba..45163cb0a8 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -1841,8 +1841,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener } @Override - public void onAnimationCancelled(boolean isKeyguardOccluded) { - mDelegate.onAnimationCancelled(isKeyguardOccluded); + public void onAnimationCancelled() { + mDelegate.onAnimationCancelled(); } } diff --git a/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java b/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java index 9f416b6844..c18ad5a626 100644 --- a/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java +++ b/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java @@ -192,7 +192,7 @@ public class LauncherBackAnimationController { } @Override - public void onAnimationCancelled(boolean isKeyguardOccluded) {} + public void onAnimationCancelled() {} }; SystemUiProxy.INSTANCE.get(mLauncher).setBackToLauncherCallback(mBackCallback, runner); diff --git a/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java b/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java index d44d7f637d..9757221a9c 100644 --- a/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java +++ b/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java @@ -517,7 +517,7 @@ public class SplitSelectStateController { } @Override - public void onAnimationCancelled(boolean isKeyguardOccluded) { + public void onAnimationCancelled() { postAsyncCallback(mHandler, () -> { if (mSuccessCallback != null) { // Launching legacy tasks while recents animation is running will always cause