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
Bug:
28635475
Change-Id: I3a2b964b34aa57267bd777305200a2bfdc66f65c
Signed-off-by: gaoshang <gaoshang@xiaomi.com>
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;