From 2fdbc5a0c499752285630336f0ef538d4a50e60e Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Thu, 30 Jun 2011 12:25:54 -0700 Subject: 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 --- core/java/android/view/ViewGroup.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 640539893961..b361e0412ee4 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -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; } -- cgit v1.2.3-59-g8ed1b