Let InputDispatcher wake quickly when we ready stop process pending key

When we already intend to send down the pending key event to the
current focus window, we should make sure it can be done immediately.

Bug:none
Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST

Signed-off-by: Linnan Li <lilinnan@xiaomi.corp-partner.google.com>
(cherry picked from https://partner-android-review.googlesource.com/q/commit:f1ab9a7e53993893ecd8a5af68eb669a9bf22e8a)
Merged-In: I4a96a6f30e803002b1592e49870334b6c3a416f7
Change-Id: I4a96a6f30e803002b1592e49870334b6c3a416f7
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index 71afbcc..f31884e 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -1312,6 +1312,7 @@
                 ALOGD("Received a new pointer down event, stop waiting for events to process and "
                       "just send the pending key event to the currently focused window.");
                 mKeyIsWaitingForEventsTimeout = now();
+                needWake = true;
             }
             break;
         }