From b699726018a0049665d8ad6b90dbc5af0e18f135 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Fri, 8 Oct 2010 22:31:17 -0700 Subject: Added more robust tracking and cancelation of events. This change fixes several issues where events would be dropped in the input dispatch pipeline in such a way that the dispatcher could not accurately track the state of the input device. Given more robust tracking, we can now also provide robust cancelation of input events in cases where an application might otherwise become out of sync with the event stream due to ANR, app switch, policy decisions, or forced focus transitions. Pruned some of the input dispatcher log output. Moved the responsibility for calling intercept*BeforeQueueing into the input dispatcher instead of the input reader and added support for early interception of injected events for events coming from trusted sources. This enables behaviors like injection of media keys while the screen is off, haptic feedback of injected virtual keys, so injected events become more "first class" in a way. Change-Id: Iec6ff1dd21e5f3c7feb80ea4feb5382bd090dbd9 --- include/ui/Input.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/ui/Input.h') diff --git a/include/ui/Input.h b/include/ui/Input.h index ee40b85d7b33..66061fd71935 100644 --- a/include/ui/Input.h +++ b/include/ui/Input.h @@ -71,6 +71,8 @@ namespace android { /* * Flags that flow alongside events in the input dispatch system to help with certain * policy decisions such as waking from device sleep. + * + * These flags are also defined in frameworks/base/core/java/android/view/WindowManagerPolicy.java. */ enum { /* These flags originate in RawEvents and are generally set in the key map. @@ -102,6 +104,11 @@ enum { // Indicates that the screen was dim when the event was received and the event // should brighten the device. POLICY_FLAG_BRIGHT_HERE = 0x20000000, + + // Indicates that the event should be dispatched to applications. + // The input event should still be sent to the InputDispatcher so that it can see all + // input events received include those that it will not deliver. + POLICY_FLAG_PASS_TO_USER = 0x40000000, }; /* -- cgit v1.2.3-59-g8ed1b