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

Commit 8249a61c authored by Alan Viverette's avatar Alan Viverette Committed by Android Git Automerger
Browse files

am f758af4e: am 32230b2b: am 882a1e89: Merge "Let host view handle long-press...

am f758af4e: am 32230b2b: am 882a1e89: Merge "Let host view handle long-press when using drag-to-open" into lmp-mr1-dev

* commit 'f758af4e':
  Let host view handle long-press when using drag-to-open
parents 72098499 f758af4e
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1385,7 +1385,9 @@ public class ListPopupWindow {
            clearCallbacks();

            final View src = mSrc;
            if (!src.isEnabled()) {
            if (!src.isEnabled() || src.isLongClickable()) {
                // Ignore long-press if the view is disabled or has its own
                // handler.
                return;
            }

@@ -1394,12 +1396,12 @@ public class ListPopupWindow {
            }

            // Don't let the parent intercept our events.
            mSrc.getParent().requestDisallowInterceptTouchEvent(true);
            src.getParent().requestDisallowInterceptTouchEvent(true);

            // Make sure we cancel any ongoing source event stream.
            final long now = SystemClock.uptimeMillis();
            final MotionEvent e = MotionEvent.obtain(now, now, MotionEvent.ACTION_CANCEL, 0, 0, 0);
            mSrc.onTouchEvent(e);
            src.onTouchEvent(e);
            e.recycle();

            mForwarding = true;