summaryrefslogtreecommitdiff
path: root/include/ui/InputManager.h
diff options
context:
space:
mode:
author Jeff Brown <jeffbrown@google.com> 2010-07-28 15:48:59 -0700
committer Jeff Brown <jeffbrown@google.com> 2010-07-29 12:54:27 -0700
commit6ec402b5ae33c8927694d8522b4cc6a5c8ba974e (patch)
tree5d4b19eda9ade71d7e34635479426f1dd484e8c2 /include/ui/InputManager.h
parent6dea6f4e71b53e421564d783c227cbe0a2469183 (diff)
DO NOT MERGE: Fix input event injection ANRs on UI thread.
Added a new asynchronous injection mode and made the existing synchronization mechanism more robust. Change-Id: Ia4aa04fd9b75ea2461a844c5b7933c831c1027e6
Diffstat (limited to 'include/ui/InputManager.h')
-rw-r--r--include/ui/InputManager.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/ui/InputManager.h b/include/ui/InputManager.h
index 7ebec10dd9ad..4012c69135f1 100644
--- a/include/ui/InputManager.h
+++ b/include/ui/InputManager.h
@@ -79,13 +79,12 @@ public:
virtual status_t unregisterInputChannel(const sp<InputChannel>& inputChannel) = 0;
/* Injects an input event and optionally waits for sync.
- * This method may block even if sync is false because it must wait for previous events
- * to be dispatched before it can determine whether input event injection will be
- * permitted based on the current input focus.
+ * The synchronization mode determines whether the method blocks while waiting for
+ * input injection to proceed.
* Returns one of the INPUT_EVENT_INJECTION_XXX constants.
*/
virtual int32_t injectInputEvent(const InputEvent* event,
- int32_t injectorPid, int32_t injectorUid, bool sync, int32_t timeoutMillis) = 0;
+ int32_t injectorPid, int32_t injectorUid, int32_t syncMode, int32_t timeoutMillis) = 0;
/* Preempts input dispatch in progress by making pending synchronous
* dispatches asynchronous instead. This method is generally called during a focus
@@ -142,7 +141,7 @@ public:
virtual status_t unregisterInputChannel(const sp<InputChannel>& inputChannel);
virtual int32_t injectInputEvent(const InputEvent* event,
- int32_t injectorPid, int32_t injectorUid, bool sync, int32_t timeoutMillis);
+ int32_t injectorPid, int32_t injectorUid, int32_t syncMode, int32_t timeoutMillis);
virtual void preemptInputDispatch();