From 58e248ebda82ef5ae16f3b5192635409ffad5f00 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Fri, 13 Jun 2014 03:12:17 +0000 Subject: [PATCH] Revert "Check OS codename for shouldOfferSwitchingToNextInputMethod" This reverts commit 1690992d1b5e37f21edb3040d5b939bd0f713efc. Build.VERSION.SDK_INT is bumped with I4716e71d72b2526fe635079d1b. We no longer need this workaround. Change-Id: I75a1c2a7055af17a7d40291aadd62ae9bb42e056 --- .../latin/RichInputMethodManager.java | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java index 64cc562c8..2b0be545e 100644 --- a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java +++ b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java @@ -410,21 +410,12 @@ public final class RichInputMethodManager { public boolean shouldOfferSwitchingToNextInputMethod(final IBinder binder, boolean defaultValue) { - // Use the default value instead on Jelly Bean MR2 and previous, where - // {@link InputMethodManager#shouldOfferSwitchingToNextInputMethod} isn't yet available. - if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN_MR2) { + // Use the default value instead on Jelly Bean MR2 and previous where + // {@link InputMethodManager#shouldOfferSwitchingToNextInputMethod} isn't yet available + // and on KitKat where the API is still just a stub to return true always. + if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) { return defaultValue; } - // Use the default value instead on KitKat as well, where - // {@link InputMethodManager#shouldOfferSwitchingToNextInputMethod} is still just a stub to - // return true always. - if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) { - // Make sure this is actually KitKat. - // TODO: Consider to remove this check once the *next* version becomes available. - if (Build.VERSION.CODENAME.equals("REL")) { - return defaultValue; - } - } return mImmWrapper.shouldOfferSwitchingToNextInputMethod(binder); } }