OSDN Git Service

Fine-tune the condition to hide IME switcher
authorYohei Yukawa <yukawa@google.com>
Mon, 31 Jul 2017 22:37:14 +0000 (15:37 -0700)
committerYohei Yukawa <yukawa@google.com>
Mon, 31 Jul 2017 22:37:14 +0000 (15:37 -0700)
commitd2bc309f0680c72731cf79f1abb300daebf1ec92
tree7d8fd02613e24f6ed2ace0e09b6dba1686ea372c
parentf98facc3b82ea45209831aa7ecdb6155b6744b57
Fine-tune the condition to hide IME switcher

This is a follow up CL to a previous CL [1] that aimed to avoid
redundant IME switcher icon/notification on the keyguard, which already
has a keyboard icon to show IME switcher.

What the previous attempt overlooked is that when some other window is
shown over the keyguard and accepting text input, then we instead may
want to show the IME switcher icon/notification in the system UI level
because such a window may or may not have the icon to show IME
switcher.

This CL addresses above case by checking whether the keyguard is also
occluded or not.  Bug 64224022 is also filed to find any other better
solution to stop relying on the keyguard visibility.

 [1]: Ibee9123f4a520e77f4baf8bdd3d75364ab451100
      2c93efc9eb188532472edc9e0c3e1ab8121aa20d

Test: Manually done as follows
      1. Enable multiple IMEs
      2. Set a password to lockscreen
      3. Lock screen
      4. Make sure that IME switcher UI is not shown when typing
         password on the keyguard (Bug 5858903 is still fixed)
      5. Show any window that has EditText over the keyguard
      6. Focus in to that EditText
      7. Make sure that IME switcher UI is shown
Fixes: 63585213
Change-Id: I2ae7fc7676e5b64d8910dbc6833d3042e8d2329a
services/core/java/com/android/server/InputMethodManagerService.java