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
Loading
Please register or sign in to comment