summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-11-01 15:13:10 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-11-01 15:13:10 -0700
commitfe17625238fbf48608040619a929bdf8a04129f1 (patch)
tree89ee3554c0b5fad50222cf82bc07ede8e31f6d57 /libs
parentd238beb3954b759994f6a8ceb57f74e447a021e0 (diff)
parent4d396052deb54399cbadbeb8abd873df6f3af342 (diff)
downloadframeworks_base-fe17625238fbf48608040619a929bdf8a04129f1.zip
frameworks_base-fe17625238fbf48608040619a929bdf8a04129f1.tar.gz
frameworks_base-fe17625238fbf48608040619a929bdf8a04129f1.tar.bz2
Merge "Fix policy issues when screen is off."
Diffstat (limited to 'libs')
-rw-r--r--libs/ui/InputDispatcher.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp
index b936c4d..58d4c56 100644
--- a/libs/ui/InputDispatcher.cpp
+++ b/libs/ui/InputDispatcher.cpp
@@ -1408,8 +1408,13 @@ String8 InputDispatcher::getApplicationWindowLabelLocked(const InputApplication*
void InputDispatcher::pokeUserActivityLocked(const EventEntry* eventEntry) {
int32_t eventType = POWER_MANAGER_BUTTON_EVENT;
- if (eventEntry->type == EventEntry::TYPE_MOTION) {
+ switch (eventEntry->type) {
+ case EventEntry::TYPE_MOTION: {
const MotionEntry* motionEntry = static_cast<const MotionEntry*>(eventEntry);
+ if (motionEntry->action == AMOTION_EVENT_ACTION_CANCEL) {
+ return;
+ }
+
if (motionEntry->source & AINPUT_SOURCE_CLASS_POINTER) {
switch (motionEntry->action) {
case AMOTION_EVENT_ACTION_DOWN:
@@ -1427,6 +1432,15 @@ void InputDispatcher::pokeUserActivityLocked(const EventEntry* eventEntry) {
break;
}
}
+ break;
+ }
+ case EventEntry::TYPE_KEY: {
+ const KeyEntry* keyEntry = static_cast<const KeyEntry*>(eventEntry);
+ if (keyEntry->flags & AKEY_EVENT_FLAG_CANCELED) {
+ return;
+ }
+ break;
+ }
}
CommandEntry* commandEntry = postCommandLocked(