OSDN Git Service

Fix IMMS#mInputShown state inconsistency.
authorSeigo Nonaka <nona@google.com>
Wed, 15 Apr 2015 09:31:32 +0000 (18:31 +0900)
committerYohei Yukawa <yukawa@google.com>
Fri, 8 May 2015 03:41:46 +0000 (20:41 -0700)
commit8d4a9117fbd0aaf03b8486ef920c73894a12cfcd
tree87dc2263c25bfabc04a8842b2f91bdd12aa4bd5b
parent78f12e43f08a1b2acda7b565a310c48e507f5e47
Fix IMMS#mInputShown state inconsistency.

The goal of this CL is to keep IMMS#mInputShown consistent with the
actual visibility of the software keyboard.  Doing it indeed fixes many
user-visible inconsistency, especially when a physical keyboards is
attached.

It turned out that there are much more cases where IMMS#mInputShown
should have been updated.  Basically every time when the software
keyboard is shown or hiden by non-user actions, IMMS#mInputShown was not
updated to the new state.  Typical cases are:
 - the IME shows its Emoji keyboard when the ALT key is pressed.
 - the system hides software keyboard when physical keyboard is
   connected.

With this CL, all known issues will disapper by updating
IMMS#mInputShown in IMMS#setImeWindowStatus().

Note that this CL depends on following preparation CLs directly or
indirectly.
- I7002ff063e490928309e9a9a0f6557ce3d12e6aa
- I1e50ee42838a1bf64a612da4904aa93458d44ea4
- I3decaf37198e5864a1763a059df4a36ebc70c5a7
- Id156c85535a221235737ea6dcc15a67f1c4b9f71
- I9f797d07ba02363fab58ceb9aecb3cc11fbc407e
- I60963f1474457ff37cca85e262460dca8105acff

Simply cherry-picking this CL into L branch is supposed to be
insufficient to fix all the issues and would result in different
regressions indeed.

BUG: 18722991
BUG: 20763994
BUG: 20764441
BUG: 20926844
Change-Id: I20ae2749a93bc33840df560aa71d4635e9ec849a
services/core/java/com/android/server/InputMethodManagerService.java