summaryrefslogtreecommitdiffstats
path: root/policy/src
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-09-23 13:51:48 -0700
committerJeff Brown <jeffbrown@google.com>2010-09-23 13:56:30 -0700
commit93ed4e3052a773289c0570984801ea8f0f0849d2 (patch)
tree3a3aa1f29bb6ad6228cc71ac337ee68ca0fd7225 /policy/src
parent37cedce14bc0e68e8bf27c2cecb181728226e6ed (diff)
downloadframeworks_base-93ed4e3052a773289c0570984801ea8f0f0849d2.zip
frameworks_base-93ed4e3052a773289c0570984801ea8f0f0849d2.tar.gz
frameworks_base-93ed4e3052a773289c0570984801ea8f0f0849d2.tar.bz2
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
Diffstat (limited to 'policy/src')
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java5
1 files changed, 4 insertions, 1 deletions
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);
+ }
}
}
};