From 11e6fdd982ab7e6df951dcfe97948f81a8f36d75 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 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 8baa324a2a..880cefa81f 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 9d6d68e652..41ab831a26 100644 --- a/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java +++ b/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java @@ -186,7 +186,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 00d6571f3c..3ca2862411 100644 --- a/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java +++ b/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java @@ -501,7 +501,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