summaryrefslogtreecommitdiffstats
path: root/include/ui/Input.h
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-10-11 14:20:19 -0700
committerJeff Brown <jeffbrown@google.com>2010-10-11 17:54:12 -0700
commite20c9e0264190f94324197a8271cf03811a4ca58 (patch)
treee482829d555d313e57ead50bc24102897dde9b36 /include/ui/Input.h
parent182e5cf105aa71effbdee15628f020214b54774c (diff)
downloadframeworks_base-e20c9e0264190f94324197a8271cf03811a4ca58.zip
frameworks_base-e20c9e0264190f94324197a8271cf03811a4ca58.tar.gz
frameworks_base-e20c9e0264190f94324197a8271cf03811a4ca58.tar.bz2
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. Cherry pick of b931a1b4 from gingerbread into master. Change-Id: I700a5f07b8b227878cea9437a289a45a245c0424
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 66061fd..8c6018b 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