aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2014-04-28 07:00:28 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-04-28 07:00:28 +0000
commitd3b5c0f39c22daa776f595ad01eeb1e330837ee0 (patch)
tree2e3f512e9df5fee539f7c8365d71e6ef5374e510 /java/src/com/android/inputmethod/latin/RichInputMethodManager.java
parent3bba98be637cb17262ab017499d248185849ed63 (diff)
parent91db602b83f5964896f9e1bc31e21ed16f775e4e (diff)
downloadlatinime-d3b5c0f39c22daa776f595ad01eeb1e330837ee0.tar.gz
latinime-d3b5c0f39c22daa776f595ad01eeb1e330837ee0.tar.xz
latinime-d3b5c0f39c22daa776f595ad01eeb1e330837ee0.zip
am 91db602b: Merge "Use shouldOfferSwitchingToNextInputMethod when available"
* commit '91db602b83f5964896f9e1bc31e21ed16f775e4e': Use shouldOfferSwitchingToNextInputMethod when available
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputMethodManager.java')
-rw-r--r--java/src/com/android/inputmethod/latin/RichInputMethodManager.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
index 630a03670..2b0be545e 100644
--- a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
+++ b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
@@ -20,6 +20,7 @@ import static com.android.inputmethod.latin.Constants.Subtype.KEYBOARD_MODE;
import android.content.Context;
import android.content.SharedPreferences;
+import android.os.Build;
import android.os.IBinder;
import android.preference.PreferenceManager;
import android.util.Log;
@@ -406,4 +407,15 @@ public final class RichInputMethodManager {
mSubtypeListCacheWithoutImplicitlySelectedSubtypes.clear();
mInputMethodInfoCache.clear();
}
+
+ 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
+ // 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 mImmWrapper.shouldOfferSwitchingToNextInputMethod(binder);
+ }
}