Loading quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackSwipeHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -283,7 +283,7 @@ public class FallbackSwipeHandler extends BaseSwipeUpHandler<RecentsActivity, Fa @Override public void onConsumerAboutToBeSwitched() { if (mInQuickSwitchMode && mGestureState.getEndTarget() != null) { mGestureState.setEndTarget(HOME); mGestureState.setEndTarget(NEW_TASK); mCanceled = true; mCurrentShift.cancelAnimation(); Loading quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +23 −3 Original line number Diff line number Diff line Loading @@ -559,10 +559,13 @@ public class TouchInteractionService extends Service implements PluginListener<O final boolean shouldDefer; final BaseSwipeUpHandler.Factory factory; if (mDeviceState.isFullyGesturalNavMode() && !mOverviewComponentObserver.isHomeAndOverviewSame()) { if (!mOverviewComponentObserver.isHomeAndOverviewSame()) { shouldDefer = previousGestureState.getFinishingRecentsAnimationTaskId() < 0; if (mDeviceState.isFullyGesturalNavMode()) { factory = mFallbackSwipeHandlerFactory; } else { factory = this::determineFallbackTwoButtonSwipeHandler; } } else { shouldDefer = gestureState.getActivityInterface().deferStartingActivity(mDeviceState, event); Loading @@ -575,6 +578,23 @@ public class TouchInteractionService extends Service implements PluginListener<O mInputMonitorCompat, disableHorizontalSwipe, factory); } /** * Determines whether to use the LauncherSwipeHandler or FallbackSwipeHandler at runtime. * We need to use the FallbackSwipeHandler to handle quick switch from home, otherwise the * normal LauncherSwipeHandler works. */ private BaseSwipeUpHandler determineFallbackTwoButtonSwipeHandler(GestureState gestureState, long touchTimeMs, boolean continuingLastGesture, boolean isLikelyToStartNewTask) { boolean runningOverHome = gestureState.getRunningTask() == null || ActivityManagerWrapper.isHomeTask(gestureState.getRunningTask()); boolean isQuickSwitchMode = isLikelyToStartNewTask || continuingLastGesture; BaseSwipeUpHandler.Factory factory = runningOverHome && isQuickSwitchMode ? mFallbackSwipeHandlerFactory : mLauncherSwipeHandlerFactory; return factory.newHandler(gestureState, touchTimeMs, continuingLastGesture, isLikelyToStartNewTask); } private InputConsumer createDeviceLockedInputConsumer(GestureState gestureState) { if (mDeviceState.isFullyGesturalNavMode() && gestureState.getRunningTask() != null) { return new DeviceLockedInputConsumer(this, mDeviceState, mTaskAnimationManager, Loading Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackSwipeHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -283,7 +283,7 @@ public class FallbackSwipeHandler extends BaseSwipeUpHandler<RecentsActivity, Fa @Override public void onConsumerAboutToBeSwitched() { if (mInQuickSwitchMode && mGestureState.getEndTarget() != null) { mGestureState.setEndTarget(HOME); mGestureState.setEndTarget(NEW_TASK); mCanceled = true; mCurrentShift.cancelAnimation(); Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +23 −3 Original line number Diff line number Diff line Loading @@ -559,10 +559,13 @@ public class TouchInteractionService extends Service implements PluginListener<O final boolean shouldDefer; final BaseSwipeUpHandler.Factory factory; if (mDeviceState.isFullyGesturalNavMode() && !mOverviewComponentObserver.isHomeAndOverviewSame()) { if (!mOverviewComponentObserver.isHomeAndOverviewSame()) { shouldDefer = previousGestureState.getFinishingRecentsAnimationTaskId() < 0; if (mDeviceState.isFullyGesturalNavMode()) { factory = mFallbackSwipeHandlerFactory; } else { factory = this::determineFallbackTwoButtonSwipeHandler; } } else { shouldDefer = gestureState.getActivityInterface().deferStartingActivity(mDeviceState, event); Loading @@ -575,6 +578,23 @@ public class TouchInteractionService extends Service implements PluginListener<O mInputMonitorCompat, disableHorizontalSwipe, factory); } /** * Determines whether to use the LauncherSwipeHandler or FallbackSwipeHandler at runtime. * We need to use the FallbackSwipeHandler to handle quick switch from home, otherwise the * normal LauncherSwipeHandler works. */ private BaseSwipeUpHandler determineFallbackTwoButtonSwipeHandler(GestureState gestureState, long touchTimeMs, boolean continuingLastGesture, boolean isLikelyToStartNewTask) { boolean runningOverHome = gestureState.getRunningTask() == null || ActivityManagerWrapper.isHomeTask(gestureState.getRunningTask()); boolean isQuickSwitchMode = isLikelyToStartNewTask || continuingLastGesture; BaseSwipeUpHandler.Factory factory = runningOverHome && isQuickSwitchMode ? mFallbackSwipeHandlerFactory : mLauncherSwipeHandlerFactory; return factory.newHandler(gestureState, touchTimeMs, continuingLastGesture, isLikelyToStartNewTask); } private InputConsumer createDeviceLockedInputConsumer(GestureState gestureState) { if (mDeviceState.isFullyGesturalNavMode() && gestureState.getRunningTask() != null) { return new DeviceLockedInputConsumer(this, mDeviceState, mTaskAnimationManager, Loading