Loading quickstep/src/com/android/quickstep/QuickScrubController.java +15 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ public class QuickScrubController implements OnAlarmListener { private int mQuickScrubSection; private boolean mStartedFromHome; private boolean mFinishedTransitionToQuickScrub; private int mLaunchingTaskId; private Runnable mOnFinishedTransitionToQuickScrubRunnable; private ActivityControlHelper mActivityControlHelper; private TouchInteractionLog mTouchInteractionLog; Loading Loading @@ -105,6 +106,7 @@ public class QuickScrubController implements OnAlarmListener { if (taskView != null) { mWaitingForTaskLaunch = true; mTouchInteractionLog.launchTaskStart(); mLaunchingTaskId = taskView.getTask().key.id; taskView.launchTask(true, (result) -> { mTouchInteractionLog.launchTaskEnd(result); if (!result) { Loading Loading @@ -146,6 +148,7 @@ public class QuickScrubController implements OnAlarmListener { mActivityControlHelper = null; mOnFinishedTransitionToQuickScrubRunnable = null; mRecentsView.setNextPageSwitchRunnable(null); mLaunchingTaskId = 0; } /** Loading Loading @@ -211,6 +214,18 @@ public class QuickScrubController implements OnAlarmListener { } } public void onTaskRemoved(int taskId) { if (mLaunchingTaskId == taskId) { // The task has been removed mid-launch, break out of quickscrub and return the user // to where they were before (and notify the launch failed) TaskView taskView = mRecentsView.getTaskView(taskId); if (taskView != null) { taskView.notifyTaskLaunchFailed(TAG); } breakOutOfQuickScrub(); } } public void snapToNextTaskIfAvailable() { if (mInQuickScrub && mRecentsView.getChildCount() > 0) { int duration = mStartedFromHome ? QUICK_SCRUB_FROM_HOME_START_DURATION Loading quickstep/src/com/android/quickstep/views/RecentsView.java +4 −0 Original line number Diff line number Diff line Loading @@ -183,6 +183,10 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl if (!mHandleTaskStackChanges) { return; } // Notify the quick scrub controller that a particular task has been removed mQuickScrubController.onTaskRemoved(taskId); BackgroundExecutor.get().submit(() -> { TaskView taskView = getTaskView(taskId); if (taskView == null) { Loading Loading
quickstep/src/com/android/quickstep/QuickScrubController.java +15 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ public class QuickScrubController implements OnAlarmListener { private int mQuickScrubSection; private boolean mStartedFromHome; private boolean mFinishedTransitionToQuickScrub; private int mLaunchingTaskId; private Runnable mOnFinishedTransitionToQuickScrubRunnable; private ActivityControlHelper mActivityControlHelper; private TouchInteractionLog mTouchInteractionLog; Loading Loading @@ -105,6 +106,7 @@ public class QuickScrubController implements OnAlarmListener { if (taskView != null) { mWaitingForTaskLaunch = true; mTouchInteractionLog.launchTaskStart(); mLaunchingTaskId = taskView.getTask().key.id; taskView.launchTask(true, (result) -> { mTouchInteractionLog.launchTaskEnd(result); if (!result) { Loading Loading @@ -146,6 +148,7 @@ public class QuickScrubController implements OnAlarmListener { mActivityControlHelper = null; mOnFinishedTransitionToQuickScrubRunnable = null; mRecentsView.setNextPageSwitchRunnable(null); mLaunchingTaskId = 0; } /** Loading Loading @@ -211,6 +214,18 @@ public class QuickScrubController implements OnAlarmListener { } } public void onTaskRemoved(int taskId) { if (mLaunchingTaskId == taskId) { // The task has been removed mid-launch, break out of quickscrub and return the user // to where they were before (and notify the launch failed) TaskView taskView = mRecentsView.getTaskView(taskId); if (taskView != null) { taskView.notifyTaskLaunchFailed(TAG); } breakOutOfQuickScrub(); } } public void snapToNextTaskIfAvailable() { if (mInQuickScrub && mRecentsView.getChildCount() > 0) { int duration = mStartedFromHome ? QUICK_SCRUB_FROM_HOME_START_DURATION Loading
quickstep/src/com/android/quickstep/views/RecentsView.java +4 −0 Original line number Diff line number Diff line Loading @@ -183,6 +183,10 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl if (!mHandleTaskStackChanges) { return; } // Notify the quick scrub controller that a particular task has been removed mQuickScrubController.onTaskRemoved(taskId); BackgroundExecutor.get().submit(() -> { TaskView taskView = getTaskView(taskId); if (taskView == null) { Loading