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

Commit dc90a46e authored by Pat Manning's avatar Pat Manning
Browse files

Skips checking for overview actions when grid only overview flag is enabled.

Fix: 296060682
Test: TaplTestsQuickstep
Flag: ENABLE_GRID_ONLY_OVERVIEW
Change-Id: If8ef23767350dbbcf80294abf6b93eebe57d3487
parent 8648f5f7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
package com.android.launcher3.testing;

import static com.android.launcher3.allapps.AllAppsStore.DEFER_UPDATES_TEST;
import static com.android.launcher3.config.FeatureFlags.ENABLE_GRID_ONLY_OVERVIEW;
import static com.android.launcher3.config.FeatureFlags.ENABLE_TRACKPAD_GESTURE;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;

@@ -251,6 +252,12 @@ public class TestInformationHandler implements ResourceBasedOverride {
                                + l.getAppsView().getActiveRecyclerView().getPaddingBottom());
            }

            case TestProtocol.REQUEST_FLAG_ENABLE_GRID_ONLY_OVERVIEW: {
                response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD,
                        ENABLE_GRID_ONLY_OVERVIEW.get());
                return response;
            }

            default:
                return null;
        }
+2 −0
Original line number Diff line number Diff line
@@ -167,6 +167,8 @@ public final class TestProtocol {
    public static final String REQUEST_IS_EMULATE_DISPLAY_RUNNING = "is-emulate-display-running";
    public static final String REQUEST_EMULATE_PRINT_DEVICE = "emulate-print-device";

    public static final String REQUEST_FLAG_ENABLE_GRID_ONLY_OVERVIEW = "enable-grid-only-overview";

    /** Logs {@link Log#d(String, String)} if {@link #sDebugTracing} is true. */
    public static void testLogD(String tag, String message) {
        if (!sDebugTracing) {
+6 −3
Original line number Diff line number Diff line
@@ -324,13 +324,16 @@ public class BaseOverview extends LauncherInstrumentation.VisibleContainer {
        if (!hasTasks() || isClearAllVisible()) {
            return false;
        }
        OverviewTask task = mLauncher.isTablet() ? getFocusedTaskForTablet() : getCurrentTask();
        boolean isTablet = mLauncher.isTablet();
        if (isTablet && mLauncher.isGridOnlyOverviewEnabled()) {
            return false;
        }
        OverviewTask task = isTablet ? getFocusedTaskForTablet() : getCurrentTask();
        if (task == null) {
            return false;
        }
        // In tablets, if focused task is not in center, overview actions aren't visible.
        if (mLauncher.isTablet()
                && Math.abs(task.getExactCenterX() - mLauncher.getExactScreenCenterX()) >= 1) {
        if (isTablet && Math.abs(task.getExactCenterX() - mLauncher.getExactScreenCenterX()) >= 1) {
            return false;
        }
        // Overview actions aren't visible for split screen tasks.
+5 −0
Original line number Diff line number Diff line
@@ -1761,6 +1761,11 @@ public final class LauncherInstrumentation {
                TestProtocol.TEST_INFO_RESPONSE_FIELD);
    }

    boolean isGridOnlyOverviewEnabled() {
        return getTestInfo(TestProtocol.REQUEST_FLAG_ENABLE_GRID_ONLY_OVERVIEW).getBoolean(
                TestProtocol.TEST_INFO_RESPONSE_FIELD);
    }

    public void sendPointer(long downTime, long currentTime, int action, Point point,
            GestureScope gestureScope) {
        final boolean hasTIS = hasTIS();