Merge "Improved ignore-backoff handling Allow a non-epidited ignore-backoff op to pass through an expidited backed off op." into gingerbread
diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp
index 28ccc43..421ad66 100644
--- a/libs/ui/InputDispatcher.cpp
+++ b/libs/ui/InputDispatcher.cpp
@@ -1405,8 +1405,13 @@
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:
@@ -1424,6 +1429,15 @@
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(