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

Skip to content
Commit a4a6960b authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Fix NPE when IMM#invalidateInput() is called too early

This is a follow up CL to my previous CL [1], which introduced

  InputMethodManager#invalidateInput(View).

One thing I overlooked is that apps may call that API even before

  InputMethodManager#mCurrentInputMethodSession,

which results in a NullPointerException.

With this CL, such a case will be gracefully fallen back into

  InputMethodManager#restartInput(View)

like other cases when IMM#invalidateInput() is not available.

 [1]: I3161755779080f98bcef0e47dd0c5247d8a3a256
      daa6695c

Fix: 213350732
Test: atest CtsInputMethodTestCases:InputMethodStartInputLifecycleTest
Change-Id: I67458494b3069498a1395e3278f6a975e821e610
parent 4d897c6a
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