diff options
author | Satoshi Kataoka <satok@google.com> | 2013-08-21 20:39:12 +0900 |
---|---|---|
committer | satok <satok@google.com> | 2013-08-22 15:51:13 +0900 |
commit | 2b10b52f6c08eb79f48f7388e2f1c69f58a9c96d (patch) | |
tree | dff00863b80e12e1819e467962d802b705b5fd04 /services | |
parent | 243a026b89bfe0b7b549665882d053c40ab0785f (diff) | |
download | frameworks_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.java | 15 |
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; |