OSDN Git Service

There should be a way to clear additional subtypes.
authorYohei Yukawa <yukawa@google.com>
Tue, 5 Jan 2016 03:42:36 +0000 (19:42 -0800)
committerYohei Yukawa <yukawa@google.com>
Fri, 15 Jan 2016 21:02:52 +0000 (21:02 +0000)
commit70f5c48e8e0403abe7e0f489b30890e46aac0d8b
treec459e1a687ab6e57cc002362bcd0b0686bf94e5c
parente8ff81c1b19a596fec2aaeaff418ae7c228634ba
There should be a way to clear additional subtypes.

InputMethodManager#setAdditionalInputMethodSubtypes() is the only API
that allows IMEs to add and remove additional subtypes.  However, due to
a bug, there is no way to clear the last entry of additional subtypes
because the API in question does nothing if the given array is emptry.

With this CL, an empty array is treated as a valid input.

This CL also adds a JavaDoc comment about a possible way to work around
this limitation in Android M and prior devices.

Bug: 26298984
Change-Id: I3731f84531247d071d9d88861e9079afc244a4e8
core/java/android/view/inputmethod/InputMethodManager.java
services/core/java/com/android/server/InputMethodManagerService.java