Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3f17361 authored by Sunny Goyal's avatar Sunny Goyal Committed by Automerger Merge Worker
Browse files

Fixing swiping up on home interrupting animation am: d481c5c5 am: 8d7fdfdd

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12152002

Change-Id: Ie64f58e81a7b08756da10345983f268cb8edc676
parents 3f6c8951 8d7fdfdd
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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;
    }
}