summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-03-29 19:04:52 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-29 19:04:52 -0700
commitb0b8df4a20990c0554ce40f63454e88f5c57dc1f (patch)
tree835f5157bd5d79e62e33c02099c8f2b95983c751
parent15d5a964fd120766d049fddfc051d10eef5e440d (diff)
parentfa8b27c858438554fd94c014de959d8ec6b208bb (diff)
downloadframeworks_base-b0b8df4a20990c0554ce40f63454e88f5c57dc1f.zip
frameworks_base-b0b8df4a20990c0554ce40f63454e88f5c57dc1f.tar.gz
frameworks_base-b0b8df4a20990c0554ce40f63454e88f5c57dc1f.tar.bz2
Merge "Improve responsiveness by always consuming batched events."
-rw-r--r--core/java/android/view/ViewRootImpl.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 4bd5b94..4d589d7 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -4056,9 +4056,13 @@ public final class ViewRootImpl implements ViewParent,
mChoreographer.removeCallbacks(Choreographer.CALLBACK_INPUT,
mConsumedBatchedInputRunnable, null);
}
- if (mInputEventReceiver != null) {
- mInputEventReceiver.consumeBatchedInputEvents();
- }
+ }
+
+ // Always consume batched input events even if not scheduled, because there
+ // might be new input there waiting for us that we have no noticed yet because
+ // the Looper has not had a chance to run again.
+ if (mInputEventReceiver != null) {
+ mInputEventReceiver.consumeBatchedInputEvents();
}
}