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

Commit cf6b71a1 authored by Vinit Nayak's avatar Vinit Nayak Committed by Android (Google) Code Review
Browse files

Merge "Allow pressing home button on recents if command queue not empty" into udc-qpr-dev

parents f909a72f a6b441bd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1328,9 +1328,9 @@ public class QuickstepLauncher extends Launcher {
                                : groupTask.mSplitBounds.leftTaskPercent);
    }

    public boolean isCommandQueueEmpty() {
    public boolean canStartHomeSafely() {
        OverviewCommandHelper overviewCommandHelper = mTISBindHelper.getOverviewCommandHelper();
        return overviewCommandHelper == null || overviewCommandHelper.isCommandQueueEmpty();
        return overviewCommandHelper == null || overviewCommandHelper.canStartHomeSafely();
    }

    private static final class LauncherTaskViewController extends
+2 −2
Original line number Diff line number Diff line
@@ -141,8 +141,8 @@ public class OverviewCommandHelper {
    }

    @UiThread
    public boolean isCommandQueueEmpty() {
        return mPendingCommands.isEmpty();
    public boolean canStartHomeSafely() {
        return mPendingCommands.isEmpty() || mPendingCommands.get(0).type == TYPE_HOME;
    }

    @Nullable
+2 −2
Original line number Diff line number Diff line
@@ -470,8 +470,8 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> {
        };
    }

    public boolean isCommandQueueEmpty() {
    public boolean canStartHomeSafely() {
        OverviewCommandHelper overviewCommandHelper = mTISBindHelper.getOverviewCommandHelper();
        return overviewCommandHelper == null || overviewCommandHelper.isCommandQueueEmpty();
        return overviewCommandHelper == null || overviewCommandHelper.canStartHomeSafely();
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -86,8 +86,8 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta
    }

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

    /**
+2 −2
Original line number Diff line number Diff line
@@ -94,8 +94,8 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher
    }

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

    @Override
Loading