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

Commit 9c43182f authored by Tony Wickham's avatar Tony Wickham
Browse files

Add FeatureFlags.LAUNCHER3_DISABLE_PINCH_TO_OVERVIEW

Bug: 27796974
Change-Id: Icda33fb62783cc3f7b510d627d1eeb9cf29bd2d3
parent d5bd67df
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ public final class FeatureFlags {
    public static boolean LAUNCHER3_LEGACY_FOLDER_ICON = false;
    public static boolean LAUNCHER3_LEGACY_LOGGING = false;
    public static boolean LAUNCHER3_USE_SYSTEM_DRAG_DRIVER = false;
    public static boolean LAUNCHER3_DISABLE_PINCH_TO_OVERVIEW = false;

    // This flags is only defined to resolve some build issues.
    public static boolean LAUNCHER3_ICON_NORMALIZATION = false;
+9 −4
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import com.android.launcher3.ShortcutAndWidgetContainer;
import com.android.launcher3.Utilities;
import com.android.launcher3.Workspace;
import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.folder.Folder;
import com.android.launcher3.folder.FolderIcon;
import com.android.launcher3.util.Thunk;
@@ -115,7 +116,7 @@ public class DragLayer extends InsettableFrameLayout {
    private Drawable mRightHoverDrawableActive;

    // Related to pinch-to-go-to-overview gesture.
    private PinchToOverviewListener mPinchListener;
    private PinchToOverviewListener mPinchListener = null;
    /**
     * Used to create a new DragLayer from XML.
     *
@@ -141,8 +142,10 @@ public class DragLayer extends InsettableFrameLayout {
        mLauncher = launcher;
        mDragController = controller;

        if (!FeatureFlags.LAUNCHER3_DISABLE_PINCH_TO_OVERVIEW) {
            mPinchListener = new PinchToOverviewListener(mLauncher);
        }
    }

    @Override
    public boolean dispatchKeyEvent(KeyEvent event) {
@@ -250,7 +253,7 @@ public class DragLayer extends InsettableFrameLayout {
        }
        clearAllResizeFrames();

        if (mPinchListener.onInterceptTouchEvent(ev)) {
        if (mPinchListener != null && mPinchListener.onInterceptTouchEvent(ev)) {
            // Stop listening for scrolling etc. (onTouchEvent() handles the rest of the pinch.)
            return true;
        }
@@ -369,7 +372,9 @@ public class DragLayer extends InsettableFrameLayout {

        // This is only reached if a pinch was started from onInterceptTouchEvent();
        // this continues sending events for it.
        if (mPinchListener != null) {
            mPinchListener.onTouchEvent(ev);
        }

        if (action == MotionEvent.ACTION_DOWN) {
            if (handleTouchDown(ev, false)) {