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

Commit 2fdbc5a0 authored by Jeff Brown's avatar Jeff Brown
Browse files

Synthetic cancel event should have touchscreen source.

Fixed a warning identified by the InputEventConsistencyVerifier
due to some code that synthesizes a touch event which it sends
to onTouchEvent with no input device source specified.
This is generally harmless but a fake source is better than
none in this case.

Change-Id: I44cfa36a4746f598f8fde3086084af3896e2ba2a
parent 2e45fb6f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1745,6 +1745,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                final long now = SystemClock.uptimeMillis();
                event = MotionEvent.obtain(now, now,
                        MotionEvent.ACTION_CANCEL, 0.0f, 0.0f, 0);
                event.setSource(InputDevice.SOURCE_TOUCHSCREEN);
                syntheticEvent = true;
            }