fix KeyEvent can't correctly finish when inputmethod time out happend
Symptom: If inputmethod handle an KeyEvent time out , Did not finish this event correctly , eventually lead to app ANR Root Cause: without seq number when obtainMessage MSG_TIMEOUT_INPUT_EVENT Solution: add seq parameter Test: Input Test: InputMethod Fixes: 37648930 Change-Id: I3a2b964b34aa57267bd777305200a2bfdc66f65c Merged-In: I3a2b964b34aa57267bd777305200a2bfdc66f65c Signed-off-by: gaoshang <gaoshang@xiaomi.com>
This commit is contained in:
@@ -1920,7 +1920,7 @@ public final class InputMethodManager {
|
||||
Trace.traceCounter(Trace.TRACE_TAG_INPUT, PENDING_EVENT_COUNTER,
|
||||
mPendingEvents.size());
|
||||
|
||||
Message msg = mH.obtainMessage(MSG_TIMEOUT_INPUT_EVENT, p);
|
||||
Message msg = mH.obtainMessage(MSG_TIMEOUT_INPUT_EVENT, seq, 0, p);
|
||||
msg.setAsynchronous(true);
|
||||
mH.sendMessageDelayed(msg, INPUT_METHOD_NOT_RESPONDING_TIMEOUT);
|
||||
return DISPATCH_IN_PROGRESS;
|
||||
|
||||
Reference in New Issue
Block a user