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

Skip to content
Commit 04ddf3c0 authored by Jeff Brown's avatar Jeff Brown
Browse files

Allow applications to recover from IME related ANRs.

Timeout after 2.5 seconds.

Because communication with an IME occurs asynchronously
using oneway binder calls, it's possible for an input event
that was delegated to the IME to be dropped on the floor.
When this happens, the app (not the IME!) will get blamed
for the problem and will ANR forever.

Even if an event is not dropped on the floor, we should
eventually time out event dispatch to the IME if it's
being too slow.

This patch implements a timeout on all events delegated
to the IME.  When the timeout expires, the event is marked
as having not been handled by the IME and the application
gets a crack at it.  We also write a message to the log when
this occurs.

Ensure that we do not invoke the event finished callback
while holding the InputMethodManager's lock to avoid
potential deadlocks.

Fixed a minor bug where the InputMethodManager would not
remember the id of the current input method.  This caused
the log messages and dumpsys state to print "null" as the
current input method id.

Bug: 6662465
Change-Id: Ibb3ddeb087ee6998996b0b845134e16a18aa3057
parent dcd3f375
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment