diff options
author | 2011-08-31 21:20:52 +0900 | |
---|---|---|
committer | 2011-09-01 14:05:01 +0900 | |
commit | d81479a340d76afaef14ce683322e1488167919c (patch) | |
tree | 80f359a756ffe3f64b08aefbfb9c69cd567c24bd /java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java | |
parent | b91b3a3e5ca1b5389e86a8851a88bfdfa5bd8ddd (diff) | |
download | latinime-d81479a340d76afaef14ce683322e1488167919c.tar.gz latinime-d81479a340d76afaef14ce683322e1488167919c.tar.xz latinime-d81479a340d76afaef14ce683322e1488167919c.zip |
Implement KeyboardLocale InputMethodSubtype extra key
The locale is specified by KeyboardLocale extra key in method.xml,
LatinIME will use the specified locale for keyboard layout.
Bug: 5238658
Change-Id: I8e6cb66c73a7ac1bf611d9910b42fa9cff38eba0
Diffstat (limited to 'java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java')
-rw-r--r-- | java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java index 7aab66d05..8e2ee0f7a 100644 --- a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java +++ b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java @@ -73,16 +73,17 @@ public class InputMethodServiceCompatWrapper extends InputMethodService { // This call is required to let LatinIME itself know a subtype changed // event when the API level is 10 or previous. @SuppressWarnings("unused") - public void notifyOnCurrentInputMethodSubtypeChanged(InputMethodSubtypeCompatWrapper subtype) { + public void notifyOnCurrentInputMethodSubtypeChanged( + InputMethodSubtypeCompatWrapper newSubtype) { // Do nothing when the API level is 11 or later // and FORCE_ENABLE_VOICE_EVEN_WITH_NO_VOICE_SUBTYPES is not true if (CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED && !InputMethodManagerCompatWrapper. FORCE_ENABLE_VOICE_EVEN_WITH_NO_VOICE_SUBTYPES) { return; } - if (subtype == null) { - subtype = mImm.getCurrentInputMethodSubtype(); - } + final InputMethodSubtypeCompatWrapper subtype = (newSubtype == null) + ? mImm.getCurrentInputMethodSubtype() + : newSubtype; if (subtype != null) { if (!InputMethodManagerCompatWrapper.FORCE_ENABLE_VOICE_EVEN_WITH_NO_VOICE_SUBTYPES && !subtype.isDummy()) return; |