Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 863ad2f8 authored by gaoshang's avatar gaoshang Committed by Michael Wright
Browse files

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
Bug: 28635475

Change-Id: I3a2b964b34aa57267bd777305200a2bfdc66f65c
Signed-off-by: default avatargaoshang <gaoshang@xiaomi.com>
parent e4b64411
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1954,7 +1954,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;