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

Commit 41dd48a7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Diagnosing the reason for opening context menu" into ub-launcher3-master

parents 4f37a5e2 bc5d7e68
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -121,6 +121,7 @@ import com.android.launcher3.popup.PopupDataProvider;
import com.android.launcher3.popup.SystemShortcut;
import com.android.launcher3.qsb.QsbContainerView;
import com.android.launcher3.states.RotationHelper;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.touch.AllAppsSwipeController;
import com.android.launcher3.touch.ItemClickHandler;
import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper;
@@ -2636,6 +2637,9 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,

                // Setting the touch point to (-1, -1) will show the options popup in the center of
                // the screen.
                if (Utilities.IS_RUNNING_IN_TEST_HARNESS) {
                    Log.d(TestProtocol.PERMANENT_DIAG_TAG, "Opening options popup on key up");
                }
                OptionsPopupView.showDefaultOptions(this, -1, -1);
            }
            return true;
+2 −0
Original line number Diff line number Diff line
@@ -83,6 +83,8 @@ public final class TestProtocol {
    public static final String REQUEST_ENABLE_DEBUG_TRACING = "enable-debug-tracing";
    public static final String REQUEST_DISABLE_DEBUG_TRACING = "disable-debug-tracing";

    public static final String PERMANENT_DIAG_TAG = "TaplTarget";

    public static final String NO_BACKGROUND_TO_OVERVIEW_TAG = "b/138251824";
    public static final String NO_DRAG_TO_WORKSPACE = "b/138729456";
    public static final String APP_NOT_DISABLED = "b/139891609";
+6 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import static com.android.launcher3.LauncherState.NORMAL;

import android.graphics.PointF;
import android.graphics.Rect;
import android.util.Log;
import android.view.GestureDetector;
import android.view.HapticFeedbackConstants;
import android.view.MotionEvent;
@@ -36,8 +37,10 @@ import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.CellLayout;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.Utilities;
import com.android.launcher3.Workspace;
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.views.OptionsPopupView;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
@@ -175,6 +178,9 @@ public class WorkspaceTouchListener extends GestureDetector.SimpleOnGestureListe
                mLauncher.getUserEventDispatcher().logActionOnContainer(Action.Touch.LONGPRESS,
                        Action.Direction.NONE, ContainerType.WORKSPACE,
                        mWorkspace.getCurrentPage());
                if (Utilities.IS_RUNNING_IN_TEST_HARNESS) {
                    Log.d(TestProtocol.PERMANENT_DIAG_TAG, "Opening options popup on long press");
                }
                OptionsPopupView.showDefaultOptions(mLauncher, mTouchDownPoint.x, mTouchDownPoint.y);
            } else {
                cancelLongPress();