diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java index b14da5c8d8..630dd70c03 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java @@ -430,20 +430,6 @@ public abstract class BaseSwipeUpHandler= end) { - return 0f; - } - return Utilities.mapToRange(progress, start, end, 1, 0, ACCEL_1_5); - } - @Override public void onUpdate(RectF currentRect, float progress) { homeAnim.setPlayFraction(progress); @@ -484,6 +470,24 @@ public abstract class BaseSwipeUpHandler= end) { + return 0f; + } + return Utilities.mapToRange(progress, start, end, 1, 0, ACCEL_1_5); + } + public interface Factory { BaseSwipeUpHandler newHandler(GestureState gestureState, long touchTimeMs, diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackSwipeHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackSwipeHandler.java index c939de88f5..034f15899f 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackSwipeHandler.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackSwipeHandler.java @@ -15,6 +15,8 @@ */ package com.android.quickstep; +import static com.android.launcher3.anim.Interpolators.ACCEL_1_5; +import static com.android.launcher3.anim.Interpolators.ACCEL_2; import static com.android.quickstep.GestureState.GestureEndTarget.HOME; import static com.android.quickstep.GestureState.GestureEndTarget.LAST_TASK; import static com.android.quickstep.GestureState.GestureEndTarget.NEW_TASK; @@ -34,6 +36,7 @@ import android.graphics.PointF; import android.graphics.RectF; import android.os.Bundle; import android.util.ArrayMap; +import android.view.MotionEvent; import com.android.launcher3.R; import com.android.launcher3.anim.AnimationSuccessListener; @@ -97,6 +100,7 @@ public class FallbackSwipeHandler extends BaseSwipeUpHandler 1 - mLauncherAlpha.value); } else { @@ -198,15 +203,27 @@ public class FallbackSwipeHandler extends BaseSwipeUpHandler { + if (!mTouchedHomeDuringTransition) { + // If the user hasn't interacted with the screen during the transition, + // send a home intent so launcher can go to the default home screen. + // (If they are trying to touch something, we don't want to interfere.) + mContext.startActivity(mGestureState.getHomeIntent()); + } + }, true); } break; } @@ -389,6 +413,8 @@ public class FallbackSwipeHandler extends BaseSwipeUpHandler