Finish recents animation when user long swipes to all apps.
Change-Id: I4b7c419236f3a31f882d8bf5a7f526cb7310215a
Fixes: 123601356
Test: Long swipe to all apps. Release and swipe down to home. Make sure live tile is gone.
diff --git a/quickstep/src/com/android/quickstep/LongSwipeHelper.java b/quickstep/src/com/android/quickstep/LongSwipeHelper.java
index 80d37ae..88dc520 100644
--- a/quickstep/src/com/android/quickstep/LongSwipeHelper.java
+++ b/quickstep/src/com/android/quickstep/LongSwipeHelper.java
@@ -19,6 +19,7 @@
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.anim.Interpolators.DEACCEL;
+import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS;
import static com.android.quickstep.WindowTransformSwipeHandler.MAX_SWIPE_DURATION;
import static com.android.quickstep.WindowTransformSwipeHandler.MIN_OVERSHOOT_DURATION;
@@ -173,5 +174,9 @@
0);
callback.run();
+
+ if (ENABLE_QUICKSTEP_LIVE_TILE.get() && toAllApps) {
+ rv.finishRecentsAnimation(true, null);
+ }
}
}
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 840d2bd..e2b4453 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -1555,7 +1555,7 @@
mClipAnimationHelper = clipAnimationHelper;
}
- public void finishRecentsAnimation(boolean toHome, Runnable onFinishComplete) {
+ public void finishRecentsAnimation(boolean toRecents, Runnable onFinishComplete) {
if (mRecentsAnimationWrapper == null) {
if (onFinishComplete != null) {
onFinishComplete.run();
@@ -1563,10 +1563,11 @@
return;
}
- mRecentsAnimationWrapper.finish(toHome, onFinishComplete);
+ mRecentsAnimationWrapper.finish(toRecents, onFinishComplete);
}
- public void takeScreenshotAndFinishRecentsAnimation(boolean toHome, Runnable onFinishComplete) {
+ public void takeScreenshotAndFinishRecentsAnimation(boolean toRecents,
+ Runnable onFinishComplete) {
if (mRecentsAnimationWrapper == null || getRunningTaskView() == null) {
if (onFinishComplete != null) {
onFinishComplete.run();
@@ -1601,7 +1602,7 @@
}
detach();
- mRecentsAnimationWrapper.finish(toHome, () -> {
+ mRecentsAnimationWrapper.finish(toRecents, () -> {
onFinishComplete.run();
mRunningTaskId = -1;
});