diff options
Diffstat (limited to 'services/inputflinger/dispatcher/InjectionState.h')
-rw-r--r-- | services/inputflinger/dispatcher/InjectionState.h | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/services/inputflinger/dispatcher/InjectionState.h b/services/inputflinger/dispatcher/InjectionState.h index 311a0f11ef..0bfafb1d19 100644 --- a/services/inputflinger/dispatcher/InjectionState.h +++ b/services/inputflinger/dispatcher/InjectionState.h @@ -17,34 +17,19 @@ #ifndef _UI_INPUT_INPUTDISPATCHER_INJECTIONSTATE_H #define _UI_INPUT_INPUTDISPATCHER_INJECTIONSTATE_H -#include "InputDispatcherInterface.h" - #include <stdint.h> +#include "InputDispatcherInterface.h" -namespace android::inputdispatcher { - -/* - * Constants used to determine the input event injection synchronization mode. - */ -enum { - /* Injection is asynchronous and is assumed always to be successful. */ - INPUT_EVENT_INJECTION_SYNC_NONE = 0, - - /* Waits for previous events to be dispatched so that the input dispatcher can determine - * whether input event injection willbe permitted based on the current input focus. - * Does not wait for the input event to finish processing. */ - INPUT_EVENT_INJECTION_SYNC_WAIT_FOR_RESULT = 1, +namespace android { - /* Waits for the input event to be completely processed. */ - INPUT_EVENT_INJECTION_SYNC_WAIT_FOR_FINISHED = 2, -}; +namespace inputdispatcher { struct InjectionState { mutable int32_t refCount; int32_t injectorPid; int32_t injectorUid; - int32_t injectionResult; // initially INPUT_EVENT_INJECTION_PENDING + android::os::InputEventInjectionResult injectionResult; // initially PENDING bool injectionIsAsync; // set to true if injection is not waiting for the result int32_t pendingForegroundDispatches; // the number of foreground dispatches in progress @@ -55,6 +40,7 @@ private: ~InjectionState(); }; -} // namespace android::inputdispatcher +} // namespace inputdispatcher +} // namespace android #endif // _UI_INPUT_INPUTDISPATCHER_INJECTIONSTATE_H |