Loading go/quickstep/src/com/android/quickstep/GoActivityControlHelper.java +5 −0 Original line number Diff line number Diff line Loading @@ -61,4 +61,9 @@ public abstract class GoActivityControlHelper<T extends BaseDraggingActivity> im // Go does not support live tiles. return false; } @Override public void onLaunchTaskFailed(T activity) { // Go does not support gestures from one task to another. } } quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java +11 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,9 @@ */ package com.android.launcher3.uioverrides.states; import android.os.Handler; import android.os.Looper; import com.android.launcher3.Launcher; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.quickstep.views.RecentsView; Loading @@ -27,6 +30,8 @@ import com.android.quickstep.views.TaskView; */ public class QuickSwitchState extends BackgroundAppState { private static final String TAG = "QuickSwitchState"; public QuickSwitchState(int id) { super(id, LauncherLogProto.ContainerType.APP); } Loading @@ -48,7 +53,12 @@ public class QuickSwitchState extends BackgroundAppState { public void onStateTransitionEnd(Launcher launcher) { TaskView tasktolaunch = launcher.<RecentsView>getOverviewPanel().getTaskViewAt(0); if (tasktolaunch != null) { tasktolaunch.launchTask(false); tasktolaunch.launchTask(false, success -> { if (!success) { launcher.getStateManager().goToState(OVERVIEW); tasktolaunch.notifyTaskLaunchFailed(TAG); } }, new Handler(Looper.getMainLooper())); } else { launcher.getStateManager().goToState(NORMAL); } Loading quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java +6 −0 Original line number Diff line number Diff line Loading @@ -224,4 +224,10 @@ public final class FallbackActivityControllerHelper implements public boolean isInLiveTileMode() { return false; } @Override public void onLaunchTaskFailed(RecentsActivity activity) { // TODO: probably go back to overview instead. activity.<RecentsView>getOverviewPanel().startHome(); } } quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java +5 −0 Original line number Diff line number Diff line Loading @@ -506,4 +506,9 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe return launcher != null && launcher.getStateManager().getState() == OVERVIEW && launcher.isStarted(); } @Override public void onLaunchTaskFailed(Launcher launcher) { launcher.getStateManager().goToState(OVERVIEW); } } No newline at end of file quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +14 −1 Original line number Diff line number Diff line Loading @@ -746,6 +746,9 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> ? 0 : (progress - mShiftAtGestureStart) / (1 - mShiftAtGestureStart)); } /** * @param windowProgress 0 == app, 1 == overview */ private void updateSysUiFlags(float windowProgress) { if (mRecentsView != null) { TaskView centermostTask = mRecentsView.getTaskViewAt(mRecentsView Loading Loading @@ -1247,7 +1250,17 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> if (!mCanceled) { TaskView nextTask = mRecentsView.getTaskView(taskId); if (nextTask != null) { nextTask.launchTask(false /* animate */, true /* freezeTaskList */); nextTask.launchTask(false /* animate */, true /* freezeTaskList */, success -> { if (!success) { // We couldn't launch the task, so take user to overview so they can // decide what to do instead of staying in this broken state. endLauncherTransitionController(); mActivityControlHelper.onLaunchTaskFailed(mActivity); nextTask.notifyTaskLaunchFailed(TAG); updateSysUiFlags(1 /* windowProgress == overview */); } }, mMainThreadHandler); doLogGesture(NEW_TASK); } reset(); Loading Loading
go/quickstep/src/com/android/quickstep/GoActivityControlHelper.java +5 −0 Original line number Diff line number Diff line Loading @@ -61,4 +61,9 @@ public abstract class GoActivityControlHelper<T extends BaseDraggingActivity> im // Go does not support live tiles. return false; } @Override public void onLaunchTaskFailed(T activity) { // Go does not support gestures from one task to another. } }
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java +11 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,9 @@ */ package com.android.launcher3.uioverrides.states; import android.os.Handler; import android.os.Looper; import com.android.launcher3.Launcher; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.quickstep.views.RecentsView; Loading @@ -27,6 +30,8 @@ import com.android.quickstep.views.TaskView; */ public class QuickSwitchState extends BackgroundAppState { private static final String TAG = "QuickSwitchState"; public QuickSwitchState(int id) { super(id, LauncherLogProto.ContainerType.APP); } Loading @@ -48,7 +53,12 @@ public class QuickSwitchState extends BackgroundAppState { public void onStateTransitionEnd(Launcher launcher) { TaskView tasktolaunch = launcher.<RecentsView>getOverviewPanel().getTaskViewAt(0); if (tasktolaunch != null) { tasktolaunch.launchTask(false); tasktolaunch.launchTask(false, success -> { if (!success) { launcher.getStateManager().goToState(OVERVIEW); tasktolaunch.notifyTaskLaunchFailed(TAG); } }, new Handler(Looper.getMainLooper())); } else { launcher.getStateManager().goToState(NORMAL); } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java +6 −0 Original line number Diff line number Diff line Loading @@ -224,4 +224,10 @@ public final class FallbackActivityControllerHelper implements public boolean isInLiveTileMode() { return false; } @Override public void onLaunchTaskFailed(RecentsActivity activity) { // TODO: probably go back to overview instead. activity.<RecentsView>getOverviewPanel().startHome(); } }
quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java +5 −0 Original line number Diff line number Diff line Loading @@ -506,4 +506,9 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe return launcher != null && launcher.getStateManager().getState() == OVERVIEW && launcher.isStarted(); } @Override public void onLaunchTaskFailed(Launcher launcher) { launcher.getStateManager().goToState(OVERVIEW); } } No newline at end of file
quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +14 −1 Original line number Diff line number Diff line Loading @@ -746,6 +746,9 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> ? 0 : (progress - mShiftAtGestureStart) / (1 - mShiftAtGestureStart)); } /** * @param windowProgress 0 == app, 1 == overview */ private void updateSysUiFlags(float windowProgress) { if (mRecentsView != null) { TaskView centermostTask = mRecentsView.getTaskViewAt(mRecentsView Loading Loading @@ -1247,7 +1250,17 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> if (!mCanceled) { TaskView nextTask = mRecentsView.getTaskView(taskId); if (nextTask != null) { nextTask.launchTask(false /* animate */, true /* freezeTaskList */); nextTask.launchTask(false /* animate */, true /* freezeTaskList */, success -> { if (!success) { // We couldn't launch the task, so take user to overview so they can // decide what to do instead of staying in this broken state. endLauncherTransitionController(); mActivityControlHelper.onLaunchTaskFailed(mActivity); nextTask.notifyTaskLaunchFailed(TAG); updateSysUiFlags(1 /* windowProgress == overview */); } }, mMainThreadHandler); doLogGesture(NEW_TASK); } reset(); Loading