summaryrefslogtreecommitdiffstats
path: root/services/input/InputDispatcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/input/InputDispatcher.cpp')
-rw-r--r--services/input/InputDispatcher.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp
index be0cec9..7862e17 100644
--- a/services/input/InputDispatcher.cpp
+++ b/services/input/InputDispatcher.cpp
@@ -1716,6 +1716,16 @@ String8 InputDispatcher::getApplicationWindowLabelLocked(
}
void InputDispatcher::pokeUserActivityLocked(const EventEntry* eventEntry) {
+ if (mFocusedWindowHandle != NULL) {
+ const InputWindowInfo* info = mFocusedWindowHandle->getInfo();
+ if (info->inputFeatures & InputWindowInfo::INPUT_FEATURE_DISABLE_USER_ACTIVITY) {
+#if DEBUG_DISPATCH_CYCLE
+ ALOGD("Not poking user activity: disabled by window '%s'.", info->name.string());
+#endif
+ return;
+ }
+ }
+
int32_t eventType = USER_ACTIVITY_EVENT_OTHER;
switch (eventEntry->type) {
case EventEntry::TYPE_MOTION: {