Skip to content
Commit 02c934b0 authored by Wilson Wu's avatar Wilson Wu
Browse files

Prevent ANR when app is terminated abruptly

When app is forced stop, the removeImeSurface flow
from DisplayImeController will be dropped in IMMS
and IMS because some fields (IMMS#mShowRequested,
IMS#mShowInputRequested..etc) still remain previous
state. The launcher cannot receive keyevent at that
time since IME surface remain and cause ANR.

Calling hideCurrentInputLocked() to hide the IME
surface when a IME client is removed.

Bug: 167780081
Test: atest CtsInputMethodTestCases
Test: Verify with issue reproduce steps:
      1) Add another language to the keyboard
      2) Open chrome and tap the EditText to show keyboard
      3) Tap to show language swiching dialog
      4) adb shell am force-stop com.android.chrome
      5) adb shell input keyevent 8
      6) Verify there is no ANR happen
Change-Id: Ifb91111f7136952462678ff6d0a5e917abb5005e
parent 23a16695
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment