summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2020-07-13 17:43:51 -0700
committerSunny Goyal <sunnygoyal@google.com>2020-07-15 07:11:30 +0000
commitd481c5c58c489fb8339ddc4e9a872230e6d563b2 (patch)
tree50f4f599c2ae1e7250828905285fbb0ab1dc48d8
parentf130c29882bd04f72edff0be87f560d6dbf6fb1e (diff)
downloadLauncher3-d481c5c58c489fb8339ddc4e9a872230e6d563b2.tar.gz
Fixing swiping up on home interrupting animation
Bug: 161180005 Change-Id: Ida59b87b2fb5905d98b0090630a6ce32fc9c36c8 Merged-In: Ida59b87b2fb5905d98b0090630a6ce32fc9c36c8 (cherry picked from commit 93188d61da1df0e2abe82775300582915b353c6e)
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandlerV2.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandlerV2.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandlerV2.java
index 37aa0dadd2..6c4c5d3f4d 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandlerV2.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandlerV2.java
@@ -42,6 +42,7 @@ import static com.android.quickstep.SysUINavigationMode.Mode.TWO_BUTTONS;
import static com.android.quickstep.util.ShelfPeekAnim.ShelfAnimState.HIDE;
import static com.android.quickstep.util.ShelfPeekAnim.ShelfAnimState.PEEK;
import static com.android.quickstep.views.RecentsView.UPDATE_SYSUI_FLAGS_THRESHOLD;
+import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME;
import android.animation.Animator;
import android.animation.TimeInterpolator;
@@ -90,6 +91,7 @@ import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.InputConsumerController;
import com.android.systemui.shared.system.LatencyTrackerCompat;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
+import com.android.systemui.shared.system.TaskInfoCompat;
import com.android.systemui.shared.system.TaskStackChangeListener;
/**
@@ -940,7 +942,8 @@ public abstract class BaseSwipeUpHandlerV2<T extends StatefulActivity<?>, Q exte
@Override
public void onActivityRestartAttempt(ActivityManager.RunningTaskInfo task,
boolean homeTaskVisible, boolean clearedTask, boolean wasVisible) {
- if (task.taskId == mGestureState.getRunningTaskId()) {
+ if (task.taskId == mGestureState.getRunningTaskId()
+ && TaskInfoCompat.getActivityType(task) != ACTIVITY_TYPE_HOME) {
// Since this is an edge case, just cancel and relaunch with default activity
// options (since we don't know if there's an associated app icon to launch from)
endRunningWindowAnim(true /* cancel */);
@@ -1327,6 +1330,6 @@ public abstract class BaseSwipeUpHandlerV2<T extends StatefulActivity<?>, Q exte
private static boolean isNotInRecents(RemoteAnimationTargetCompat app) {
return app.isNotInRecents
- || app.activityType == RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME;
+ || app.activityType == ACTIVITY_TYPE_HOME;
}
}