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

Commit 718c4da0 authored by Yuichiro Hanada's avatar Yuichiro Hanada
Browse files

Enter to touch mode by down or scroll event from any type of a device.

This CL reverts the touch mode behavior to that in N and prior.

Bug: 135752906
Bug: 147710276
Test: Mouse click causes entering to touch mode.
Test: ViewTest#testTouchMode
Change-Id: I9d6a8ad95fba524701df7d318732d553fce958f8
Merged-In: Id5fbb500eed279c66ed6817c2b7d001a5a68737a
(cherry picked from commit 391c123e)
parent a23a8bf8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5699,9 +5699,9 @@ public final class ViewRootImpl implements ViewParent,
                mTranslator.translateEventInScreenToAppWindow(event);
            }

            // Enter touch mode if event is coming from a touch screen device.
            // Enter touch mode on down or scroll from any type of a device.
            final int action = event.getAction();
            if (event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN)) {
            if (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_SCROLL) {
                ensureTouchMode(true);
            }