summaryrefslogtreecommitdiff
path: root/include/ui/Input.h
diff options
context:
space:
mode:
author Jeff Brown <jeffbrown@google.com> 2010-10-11 14:20:19 -0700
committer Jeff Brown <jeffbrown@google.com> 2010-10-11 16:26:13 -0700
commit1fe6dec0975d0cf7faf367f6bcb30c67d2025a47 (patch)
treec4de928b6acf0d9cca89caff46c3beda71ff4277 /include/ui/Input.h
parent90f0cee685f9b13e6bac7793717a9d15de8eafe8 (diff)
Fix an event injection bug when the policy is bypassed.
Added the concept of a "trusted" event to distinguish between events from attached input devices or trusted injectors vs. other applications. This change enables us to move certain policy decisions out of the dispatcher and into the policy itself where they can be handled more systematically. Change-Id: I4d56fdcdd31aaa675d452088af39a70c4e039970
Diffstat (limited to 'include/ui/Input.h')
-rw-r--r--include/ui/Input.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/ui/Input.h b/include/ui/Input.h
index 66061fd719..8c6018bfee 100644
--- a/include/ui/Input.h
+++ b/include/ui/Input.h
@@ -95,6 +95,10 @@ enum {
// Indicates that the input event was injected.
POLICY_FLAG_INJECTED = 0x01000000,
+ // Indicates that the input event is from a trusted source such as a directly attached
+ // input device or an application with system-wide event injection permission.
+ POLICY_FLAG_TRUSTED = 0x02000000,
+
/* These flags are set by the input reader policy as it intercepts each event. */
// Indicates that the screen was off when the event was received and the event