summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2013-08-21 20:39:12 +0900
committersatok <satok@google.com>2013-08-22 15:51:13 +0900
commit2b10b52f6c08eb79f48f7388e2f1c69f58a9c96d (patch)
treedff00863b80e12e1819e467962d802b705b5fd04 /services
parent243a026b89bfe0b7b549665882d053c40ab0785f (diff)
downloadframeworks_base-2b10b52f6c08eb79f48f7388e2f1c69f58a9c96d.zip
frameworks_base-2b10b52f6c08eb79f48f7388e2f1c69f58a9c96d.tar.gz
frameworks_base-2b10b52f6c08eb79f48f7388e2f1c69f58a9c96d.tar.bz2
Add new API shouldOfferSwitchingToNextInputMethod
Bug: 8364845 Change-Id: I6767f5640a07aa515a930645b0cf0b36fbe94831
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/InputMethodManagerService.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index f442f11..45c614f 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -2159,6 +2159,21 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
}
@Override
+ public boolean shouldOfferSwitchingToNextInputMethod(IBinder token) {
+ if (!calledFromValidUser()) {
+ return false;
+ }
+ synchronized (mMethodMap) {
+ final ImeSubtypeListItem nextSubtype = mImListManager.getNextInputMethod(
+ false /* onlyCurrentIme */, mMethodMap.get(mCurMethodId), mCurrentSubtype);
+ if (nextSubtype == null) {
+ return false;
+ }
+ return true;
+ }
+ }
+
+ @Override
public InputMethodSubtype getLastInputMethodSubtype() {
if (!calledFromValidUser()) {
return null;