OSDN Git Service

Make sure to call back reportFinish() on the desired Handler.
authorYohei Yukawa <yukawa@google.com>
Wed, 23 Mar 2016 04:27:48 +0000 (21:27 -0700)
committerYohei Yukawa <yukawa@google.com>
Wed, 23 Mar 2016 04:27:48 +0000 (21:27 -0700)
commit16e2c7b59aacf44df7aaa0d04e0228240907487f
tree3a34a36659300f7f4eedd0d108e63cc4e539b824
parentafb6558c8f5e0ee797b252558d7e529e3d946d8f
Make sure to call back reportFinish() on the desired Handler.

Before exposing #reportFinish() as a public API, we have to fix an
existing bug that my previous CL [1] for Bug 26945674 forgot to take care.

Currently BaseInputConnection#reportFinish() is always called by using
the root view's Handler.  We should move the logic to call
BaseInputConnection#reportFinishInputConnection() from ViewRootImpl to
IInputConnectionWrapper to make sure that the method in question can
always be called on the desired Handler.

To make things simple, instead of explicitly calling #reportFinish()
from IMM, this CL let ControlledInputConnectionWrapper#diactivate()
internally call #reportFinish() as needed.  This makes it easier to make
sure that #reportFinish() is called after all the queued method calls
are handled.

  [1]: Id9e579bb3e2966986cdcb1c34bc8cacfeca2e1a9
       612cce92ad96eda1146c3abd2afa7aaa4d4f2b3f

Bug: 25332806
Change-Id: Ibe94f115e607a198d12ecd3d4e4f91a7d9469c98
core/java/android/view/ViewRootImpl.java
core/java/android/view/inputmethod/BaseInputConnection.java
core/java/android/view/inputmethod/InputMethodManager.java
core/java/com/android/internal/view/IInputConnectionWrapper.java
core/java/com/android/internal/widget/EditableInputConnection.java