OSDN Git Service

Accept null subtype in InputMethodSubtypeHandle.
authorYohei Yukawa <yukawa@google.com>
Wed, 20 Apr 2016 23:59:45 +0000 (16:59 -0700)
committerYohei Yukawa <yukawa@google.com>
Wed, 20 Apr 2016 23:59:45 +0000 (16:59 -0700)
commit46ac35d09b0a1ba7af7eb4c14293a7978edcd2ab
treee8ebb9ccaa258721c07df2f42cb0a183faf35168
parent54c4374b4a67fdfbda936e7f4a8a9538e16c3557
Accept null subtype in InputMethodSubtypeHandle.

There are two types of IMEs:
 A. IMEs that have one or more subtypes
 B. IMEs that have no subtype

The initial implementation to update hardware keyboard layout per
subtype change of layout (See Bug 25752812) has supported IMEs in the
category A only, and IMEs in the category B are just ignored in both
system and Settings app.

In order to support IMEs in the category B, InputMethodSubtypeHandle and
related methods need to accept null InputMethodSubtype. Technically
this is a straightforward change, because in InputMethodManagerService
we have already used InputMethodUtils.NOT_A_SUBTYPE_ID for those IMEs in
the category B.  We also need to update Setting App, which will be done
by a different CL [1].

  [1]: I46b9c5b018f08e3eaa4614a0893db0be91652f3c

Bug: 28182650
Change-Id: Ia013784a594ad3beaf30976d047f5ac0fa8185be
core/java/android/hardware/input/InputManager.java
core/java/com/android/internal/inputmethod/InputMethodSubtypeHandle.java
services/core/java/com/android/server/input/InputManagerService.java