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

Commit 759f771a authored by vadimt's avatar vadimt
Browse files

Generating a long-press even only when it's expected

I'm pretty sure that accidental long-presses are a result of fundamental
flaws in UIAutomator. The fix is tracked separately and is unlikely to
happen at all.

For now, just placing the generation under a condition.

Bug: 156113558
Change-Id: I8f369f934f9f576cf672b7fa98fbc9a63135602b
parent 9e77f25d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -167,8 +167,8 @@ public class WorkspaceTouchListener extends GestureDetector.SimpleOnGestureListe

    @Override
    public void onLongPress(MotionEvent event) {
        TestLogging.recordEvent(TestProtocol.SEQUENCE_MAIN, "Workspace.longPress");
        if (mLongPressState == STATE_REQUESTED) {
            TestLogging.recordEvent(TestProtocol.SEQUENCE_MAIN, "Workspace.longPress");
            if (canHandleLongPress()) {
                mLongPressState = STATE_PENDING_PARENT_INFORM;
                mWorkspace.getParent().requestDisallowInterceptTouchEvent(true);