diff options
author | 2012-04-02 21:25:01 +0900 | |
---|---|---|
committer | 2012-04-02 23:22:49 +0900 | |
commit | 19457316c1da5e4ca52d2fe8039d76469fbf1e61 (patch) | |
tree | 2df678a5445366129e3e1dfe8a6834602f2c68e0 /java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java | |
parent | b1904ec2352ac65ce06fe556c7ce3b4f2d2dea88 (diff) | |
download | latinime-19457316c1da5e4ca52d2fe8039d76469fbf1e61.tar.gz latinime-19457316c1da5e4ca52d2fe8039d76469fbf1e61.tar.xz latinime-19457316c1da5e4ca52d2fe8039d76469fbf1e61.zip |
Remove CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED boolean
Bug: 6129704
Change-Id: I7643e656c6e7656eff339cc301dd32f34dee83a4
Diffstat (limited to 'java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java')
-rw-r--r-- | java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java index 7c15be300..6386fed78 100644 --- a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java +++ b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java @@ -27,15 +27,6 @@ import com.android.inputmethod.keyboard.KeyboardSwitcher; import com.android.inputmethod.latin.SubtypeSwitcher; public class InputMethodServiceCompatWrapper extends InputMethodService { - // CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED needs to be false if the API level is 10 - // or previous. Note that InputMethodSubtype was added in the API level 11. - // For the API level 11 or later, LatinIME should override onCurrentInputMethodSubtypeChanged(). - // For the API level 10 or previous, we handle the "subtype changed" events by ourselves - // without having support from framework -- onCurrentInputMethodSubtypeChanged(). - public static final boolean CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED = true; - - private InputMethodManagerCompatWrapper mImm; - // For compatibility of {@link InputMethodManager#showInputMethodPicker}. // TODO: Move this variable back to LatinIME when this compatibility wrapper is removed. protected AlertDialog mOptionsDialog; @@ -62,32 +53,6 @@ public class InputMethodServiceCompatWrapper extends InputMethodService { @Override public void onCreate() { super.onCreate(); - mImm = InputMethodManagerCompatWrapper.getInstance(); - } - - // When the API level is 10 or previous, notifyOnCurrentInputMethodSubtypeChanged should - // handle the event the current subtype was changed. LatinIME calls - // notifyOnCurrentInputMethodSubtypeChanged every time LatinIME - // changes the current subtype. - // 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 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; - } - final InputMethodSubtypeCompatWrapper subtype = (newSubtype == null) - ? mImm.getCurrentInputMethodSubtype() - : newSubtype; - if (subtype != null) { - if (!InputMethodManagerCompatWrapper.FORCE_ENABLE_VOICE_EVEN_WITH_NO_VOICE_SUBTYPES - && !subtype.isDummy()) return; - SubtypeSwitcher.getInstance().updateSubtype(subtype); - } } ////////////////////////////////////// @@ -95,8 +60,6 @@ public class InputMethodServiceCompatWrapper extends InputMethodService { ////////////////////////////////////// @Override public void onCurrentInputMethodSubtypeChanged(InputMethodSubtype subtype) { - // Do nothing when the API level is 10 or previous - if (!CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED) return; SubtypeSwitcher.getInstance().updateSubtype( new InputMethodSubtypeCompatWrapper(subtype)); } |