am c1cb930d: Merge "Revert "Check OS codename for shouldOfferSwitchingToNextInputMethod""

* commit 'c1cb930dde27414a0d8b15ae345650d41ba56add':
  Revert "Check OS codename for shouldOfferSwitchingToNextInputMethod"
main
Yohei Yukawa 2014-06-13 03:20:19 +00:00 committed by Android Git Automerger
commit 3d4be8cfc5
1 changed files with 4 additions and 13 deletions

View File

@ -409,21 +409,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);
}
}