diff options
author | Michael Wright <michaelwr@google.com> | 2015-06-10 17:47:58 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-06-10 17:47:58 +0000 |
commit | a393c62f22695fdca59f6a8be9d72ae8b8bf92c8 (patch) | |
tree | 4a31dc87cd9fd3ce3d073ced845000353f05e0df /services/inputflinger | |
parent | 82cdd76e60c7219442879c8aec949ff66a4b0fd4 (diff) | |
parent | f8b34319a4c1ccce63b5a8e4732f162d228085cb (diff) | |
download | frameworks_native-a393c62f22695fdca59f6a8be9d72ae8b8bf92c8.zip frameworks_native-a393c62f22695fdca59f6a8be9d72ae8b8bf92c8.tar.gz frameworks_native-a393c62f22695fdca59f6a8be9d72ae8b8bf92c8.tar.bz2 |
am f8b34319: am 043bd36b: Merge "Only log dropped input when disabled for the first event." into mnc-dev
* commit 'f8b34319a4c1ccce63b5a8e4732f162d228085cb':
Only log dropped input when disabled for the first event.
Diffstat (limited to 'services/inputflinger')
-rw-r--r-- | services/inputflinger/InputDispatcher.cpp | 8 | ||||
-rw-r--r-- | services/inputflinger/InputDispatcher.h | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/services/inputflinger/InputDispatcher.cpp b/services/inputflinger/InputDispatcher.cpp index a87cc77..ffaa7e7 100644 --- a/services/inputflinger/InputDispatcher.cpp +++ b/services/inputflinger/InputDispatcher.cpp @@ -201,7 +201,8 @@ static void dumpRegion(String8& dump, const Region& region) { InputDispatcher::InputDispatcher(const sp<InputDispatcherPolicyInterface>& policy) : mPolicy(policy), - mPendingEvent(NULL), mAppSwitchSawKeyDown(false), mAppSwitchDueTime(LONG_LONG_MAX), + mPendingEvent(NULL), mLastDropReason(DROP_REASON_NOT_DROPPED), + mAppSwitchSawKeyDown(false), mAppSwitchDueTime(LONG_LONG_MAX), mNextUnblockedEvent(NULL), mDispatchEnabled(false), mDispatchFrozen(false), mInputFilterEnabled(false), mInputTargetWaitCause(INPUT_TARGET_WAIT_CAUSE_NONE) { @@ -397,6 +398,7 @@ void InputDispatcher::dispatchOnceInnerLocked(nsecs_t* nextWakeupTime) { if (dropReason != DROP_REASON_NOT_DROPPED) { dropInboundEventLocked(mPendingEvent, dropReason); } + mLastDropReason = dropReason; releasePendingEventLocked(); *nextWakeupTime = LONG_LONG_MIN; // force next poll to wake up immediately @@ -506,7 +508,9 @@ void InputDispatcher::dropInboundEventLocked(EventEntry* entry, DropReason dropR reason = "inbound event was dropped because the policy consumed it"; break; case DROP_REASON_DISABLED: - ALOGI("Dropped event because input dispatch is disabled."); + if (mLastDropReason != DROP_REASON_DISABLED) { + ALOGI("Dropped event because input dispatch is disabled."); + } reason = "inbound event was dropped because input dispatch is disabled"; break; case DROP_REASON_APP_SWITCH: diff --git a/services/inputflinger/InputDispatcher.h b/services/inputflinger/InputDispatcher.h index 9a340c9..80eed56 100644 --- a/services/inputflinger/InputDispatcher.h +++ b/services/inputflinger/InputDispatcher.h @@ -857,6 +857,8 @@ private: Queue<EventEntry> mRecentQueue; Queue<CommandEntry> mCommandQueue; + DropReason mLastDropReason; + void dispatchOnceInnerLocked(nsecs_t* nextWakeupTime); // Enqueues an inbound event. Returns true if mLooper->wake() should be called. |