Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58e248eb authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Revert "Check OS codename for shouldOfferSwitchingToNextInputMethod"

This reverts commit 1690992d.

Build.VERSION.SDK_INT is bumped with I4716e71d72b2526fe635079d1b.                                                                                     
We no longer need this workaround.

Change-Id: I75a1c2a7055af17a7d40291aadd62ae9bb42e056
parent 1690992d
Loading
Loading
Loading
Loading
+4 −13
Original line number Original line Diff line number Diff line
@@ -410,21 +410,12 @@ public final class RichInputMethodManager {


    public boolean shouldOfferSwitchingToNextInputMethod(final IBinder binder,
    public boolean shouldOfferSwitchingToNextInputMethod(final IBinder binder,
            boolean defaultValue) {
            boolean defaultValue) {
        // Use the default value instead on Jelly Bean MR2 and previous, where
        // Use the default value instead on Jelly Bean MR2 and previous where
        // {@link InputMethodManager#shouldOfferSwitchingToNextInputMethod} isn't yet available.
        // {@link InputMethodManager#shouldOfferSwitchingToNextInputMethod} isn't yet available
        if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN_MR2) {
        // 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;
            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);
        return mImmWrapper.shouldOfferSwitchingToNextInputMethod(binder);
    }
    }
}
}