From 93ed4e3052a773289c0570984801ea8f0f0849d2 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Thu, 23 Sep 2010 13:51:48 -0700 Subject: Enforce serial ordering of MotionEvents. This change modifies ViewRoot to wait until the MotionEvent has been delivered before telling the input dispatcher that it is finished. The serial ordering guarantee will be required by new features that may need to transfer touch focus from one window to another. Change-Id: I0a64d1f0c8bc3f08846f213d6e28ce48b1d48e58 --- policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'policy/src') diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 274124b..567b270 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -232,8 +232,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public void handleMotion(MotionEvent event, Runnable finishedCallback) { finishedCallback.run(); + synchronized (mLock) { - mPointerLocationView.addTouchEvent(event); + if (mPointerLocationView != null) { + mPointerLocationView.addTouchEvent(event); + } } } }; -- cgit v1.1