diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index 6507dfe929..512d5f4014 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -1305,6 +1305,13 @@ public class QuickstepLauncher extends Launcher { : groupTask.mSplitBounds.leftTaskPercent); } + @Override + public boolean isCommandQueueEmpty() { + OverviewCommandHelper overviewCommandHelper = mTISBindHelper.getOverviewCommandHelper(); + return super.isCommandQueueEmpty() + && (overviewCommandHelper == null || overviewCommandHelper.isCommandQueueEmpty()); + } + private static final class LauncherTaskViewController extends TaskViewTouchController { diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java index a0d49a4f7e..4a60566bd8 100644 --- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java +++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java @@ -140,6 +140,11 @@ public class OverviewCommandHelper { mPendingCommands.clear(); } + @UiThread + public boolean isCommandQueueEmpty() { + return mPendingCommands.isEmpty(); + } + @Nullable private TaskView getNextTask(RecentsView view) { final TaskView runningTaskView = view.getRunningTaskView(); diff --git a/quickstep/src/com/android/quickstep/RecentsActivity.java b/quickstep/src/com/android/quickstep/RecentsActivity.java index bf96690dd2..e282d1fffb 100644 --- a/quickstep/src/com/android/quickstep/RecentsActivity.java +++ b/quickstep/src/com/android/quickstep/RecentsActivity.java @@ -466,4 +466,11 @@ public final class RecentsActivity extends StatefulActivity { } }; } + + @Override + public boolean isCommandQueueEmpty() { + OverviewCommandHelper overviewCommandHelper = mTISBindHelper.getOverviewCommandHelper(); + return super.isCommandQueueEmpty() + && (overviewCommandHelper == null || overviewCommandHelper.isCommandQueueEmpty()); + } } diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java index 45930446b1..a9a57c6c2d 100644 --- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java +++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java @@ -80,11 +80,16 @@ public class FallbackRecentsView extends RecentsView> * @param leftOrTop if the staged split will be positioned left or top. */ public void enterStageSplitFromRunningApp(boolean leftOrTop) { } + + + /** Returns whether the overview command helper queue is empty. */ + public boolean isCommandQueueEmpty() { + return true; + } }