Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a12786c authored by Schneider Victor-tulias's avatar Schneider Victor-tulias Committed by Android (Google) Code Review
Browse files

Merge "Skip sending user home when the overview command queue is pending." into udc-qpr-dev

parents bf07480e cb0de752
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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<Launcher> {

+5 −0
Original line number Diff line number Diff line
@@ -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();
+7 −0
Original line number Diff line number Diff line
@@ -466,4 +466,11 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> {
            }
        };
    }

    @Override
    public boolean isCommandQueueEmpty() {
        OverviewCommandHelper overviewCommandHelper = mTISBindHelper.getOverviewCommandHelper();
        return super.isCommandQueueEmpty()
                && (overviewCommandHelper == null || overviewCommandHelper.isCommandQueueEmpty());
    }
}
+6 −1
Original line number Diff line number Diff line
@@ -80,11 +80,16 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta
    }

    @Override
    public void startHome(boolean animated) {
    protected void handleStartHome(boolean animated) {
        mActivity.startHome();
        AbstractFloatingView.closeAllOpenViews(mActivity, mActivity.isStarted());
    }

    @Override
    public boolean isCommandQueueEmpty() {
        return mActivity.isCommandQueueEmpty();
    }

    /**
     * When starting gesture interaction from home, we add a temporary invisible tile corresponding
     * to the home task. This allows us to handle quick-switch similarly to a quick-switching
+6 −1
Original line number Diff line number Diff line
@@ -82,13 +82,18 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher
    }

    @Override
    public void startHome(boolean animated) {
    protected void handleStartHome(boolean animated) {
        StateManager stateManager = mActivity.getStateManager();
        animated &= stateManager.shouldAnimateStateChange();
        stateManager.goToState(NORMAL, animated);
        AbstractFloatingView.closeAllOpenViews(mActivity, animated);
    }

    @Override
    public boolean isCommandQueueEmpty() {
        return mActivity.isCommandQueueEmpty();
    }

    @Override
    protected void onTaskLaunchAnimationEnd(boolean success) {
        if (success) {
Loading