Fix a crash in the path to auto-show the IME
Upon cold launch of Browser2, its window gets input focus immediately.
InputMethodManagerService, due to IPC from InputMethodManager.onPostWindowFocus,
tries to auto-show the IME before the input session/connection between IME and
Browser2 is set up successfully. This is why getCurrentInputConnection() returns
null in onStartInputView().
EditorInfo.initialCapsMode has been set to the same value, just use it directly.
Test: reboot device or emulator, launch Browser2, search am_crash
Bug: 116830903
Change-Id: I545ce7da912d140c54722e265111accb38b7e361
Signed-off-by: Guobin Zhang <[email protected]>
(cherry picked from commit a930ca809ff1d84c4316031a0ef1d7c3d272d0b8)
1 file changed