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

Fix duplicate calls of IMS#doStartInput()

This is another follow up CL to my previous CL [1], which had a bug
that InputMethodService#doStartInput() is now always called back twice.

There was a careless mistake when rebasing the CL [1] onto the previous
CL [2], which ended up with dispatching startInput() twice in
IInputMethodWrapper.

In short, InputMethod#dispatchStartInputWithToken() is the new way to
dispatch startInput()/restartInput(). We do not need to call both of
them.

 [1]: I9921b381e02106dbffff5e0b3d13f0a1245ce807
      6db3bfe3
 [2]: I476d0cf8cbb0a0134941854f9337d9ad15e66a71
      f7526b58

Test: Set true to InputMethodService#DEBUG and make sure startInput()
      and restartInput() are called in the following scenario.
      1. Complete the setup wizard.
      2. adb shell am start -a android.app.action.SET_NEW_PASSWORD
      3. Proceed to "Choose your password" page
      4. Make sure startInput() gets called only once.
      5. Type "aaaa" then hit "CONTINUE" button.
      6. Make sure restartInput() gets called only once.
Bug: 35079353
Fixes: 35442939
Change-Id: Ifde16c3fad5b787d4c9a11bd886943dfe96f9eb9
parent 040e425b
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