diff options
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
| -rw-r--r-- | core/java/android/inputmethodservice/InputMethodService.java | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 14f92fbb4194..f55c41594389 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -658,7 +658,7 @@ public class InputMethodService extends AbstractInputMethodService { @Override public final void initializeInternal(@NonNull IBinder token, IInputMethodPrivilegedOperations privilegedOperations, int configChanges, - boolean stylusHwSupported) { + boolean stylusHwSupported, boolean shouldShowImeSwitcherWhenImeIsShown) { if (mDestroyed) { Log.i(TAG, "The InputMethodService has already onDestroyed()." + "Ignore the initialization."); @@ -671,6 +671,8 @@ public class InputMethodService extends AbstractInputMethodService { if (stylusHwSupported) { mInkWindow = new InkWindow(mWindow.getContext()); } + mNavigationBarController.setShouldShowImeSwitcherWhenImeIsShown( + shouldShowImeSwitcherWhenImeIsShown); attachToken(token); Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); } @@ -780,9 +782,10 @@ public class InputMethodService extends AbstractInputMethodService { @Override public final void dispatchStartInputWithToken(@Nullable InputConnection inputConnection, @NonNull EditorInfo editorInfo, boolean restarting, - @NonNull IBinder startInputToken) { + @NonNull IBinder startInputToken, boolean shouldShowImeSwitcherWhenImeIsShown) { mPrivOps.reportStartInputAsync(startInputToken); - + mNavigationBarController.setShouldShowImeSwitcherWhenImeIsShown( + shouldShowImeSwitcherWhenImeIsShown); if (restarting) { restartInput(inputConnection, editorInfo); } else { @@ -796,6 +799,18 @@ public class InputMethodService extends AbstractInputMethodService { */ @MainThread @Override + public void onShouldShowImeSwitcherWhenImeIsShownChanged( + boolean shouldShowImeSwitcherWhenImeIsShown) { + mNavigationBarController.setShouldShowImeSwitcherWhenImeIsShown( + shouldShowImeSwitcherWhenImeIsShown); + } + + /** + * {@inheritDoc} + * @hide + */ + @MainThread + @Override public void hideSoftInputWithToken(int flags, ResultReceiver resultReceiver, IBinder hideInputToken) { mSystemCallingHideSoftInput = true; |
