From 75917b603fe83a87c0fe3902e1a768fc31f8d120 Mon Sep 17 00:00:00 2001 From: satok Date: Wed, 31 Aug 2011 23:27:39 +0900 Subject: [PATCH] Add a comment for setAdditionalInputMethodSubtypes Change-Id: I3a19471b80a6f8a68473cba6f0fc934bd052af10 --- .../java/android/view/inputmethod/InputMethodManager.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index da5baf86a97c6..302be57d54af4 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -1583,6 +1583,14 @@ public final class InputMethodManager { /** * Set additional input method subtypes. Only a process which shares the same uid with the IME * can add additional input method subtypes to the IME. + * Please note that a subtype's status is stored in the system. + * For example, enabled subtypes are remembered by the framework even after they are removed + * by using this method. If you re-add the same subtypes again, + * they will just get enabled. If you want to avoid such conflicts, for instance, you may + * want to create a "different" new subtype even with the same locale and mode, + * by changing its extra value. The different subtype won't get affected by the stored past + * status. (You may want to take a look at {@link InputMethodSubtype#hashCode()} to refer + * to the current implementation.) * @param imiId Id of InputMethodInfo which additional input method subtypes will be added to. * @param subtypes subtypes will be added as additional subtypes of the current input method. * @return true if the additional input method subtypes are successfully added.