diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 9228fbdf82c82..9e5298b044975 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -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); }