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

Commit ff20a30a authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Skips checking for overview actions when grid only overview flag is...

Merge "Skips checking for overview actions when grid only overview flag is enabled." into udc-qpr-dev am: bc6e67da

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24433309



Change-Id: Ibea973ad6c90a7966df2b55ce30de3fdb221290d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 99fbce8e bc6e67da
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.config.FeatureFlags.FOLDABLE_SINGLE_PAGE;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
@@ -253,6 +254,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();