OSDN Git Service

Unbind IME client when unsetting the current IME.
authorYohei Yukawa <yukawa@google.com>
Tue, 13 Oct 2015 00:08:59 +0000 (17:08 -0700)
committerYohei Yukawa <yukawa@google.com>
Tue, 13 Oct 2015 00:08:59 +0000 (17:08 -0700)
commit739d0b0585950d6e4717132b7e4c6f7f963288ab
treeed98b689c4b887fbd8ae740a8b095385edcbbca1
parent6cc3735a492abd1c17f15a46287de70e62bf116d
Unbind IME client when unsetting the current IME.

This follows up Ia70b870723acf647e0c27f24aff91b40d6f85543.

In certain scenarios, only IMMS#mCurMethodId is cleared with null
while IMMS#mCurClient is still pointing to the last application.
This is problematic when IMMS#mCurClient matches
SystemConfig#getFixedImeApps(), because it means that the current
IME is to be fixed to null.

With this CL, IMMS#unbindCurrentClientLocked() is always called
every time when IMMS#mCurMethodId is cleared to null.  Note that
clearing IMMS#mCurMethodId to null is a kind of hard-reset, where
unbinding IME client should make much sense in terms of robust
and predictable state management.

Bug: 18056075
Change-Id: I6c3186050592526fc95c5b27f18e2155acff5ebc
(cherry picked from commit e13a20faccf6f33aa43c9c1fa4c4ec2a79b86cfb)
services/core/java/com/android/server/InputMethodManagerService.java