From 0ca3f98ec6bf3aef3943ac6ae066ba07ee639272 Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Fri, 29 Oct 2021 11:46:18 -0700 Subject: [PATCH] Invoke IME switcher for taskbar through SysUI Bug: 191814219 Test: IME switcher works small and large screen Change-Id: Ic2db60357a13846bb34dddd64b27ecbbf8ff656f --- .../launcher3/taskbar/TaskbarNavButtonController.java | 4 +--- .../src/com/android/quickstep/SystemUiProxy.java | 11 +++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java index 6fbef9bf83..a8a0b59f87 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarNavButtonController.java @@ -102,9 +102,7 @@ public class TaskbarNavButtonController { } private void showIMESwitcher() { - mService.getSystemService(InputMethodManager.class) - .showInputMethodPickerFromSystem(true /* showAuxiliarySubtypes */, - DEFAULT_DISPLAY); + SystemUiProxy.INSTANCE.getNoCreate().onImeSwitcherPressed(); } private void notifyImeClick(boolean longClick) { diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java index d9319a9b00..9fc557dd0d 100644 --- a/quickstep/src/com/android/quickstep/SystemUiProxy.java +++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java @@ -116,6 +116,17 @@ public class SystemUiProxy implements ISystemUiProxy, } } + @Override + public void onImeSwitcherPressed() { + if (mSystemUiProxy != null) { + try { + mSystemUiProxy.onImeSwitcherPressed(); + } catch (RemoteException e) { + Log.w(TAG, "Failed call onImeSwitcherPressed", e); + } + } + } + @Override public void setHomeRotationEnabled(boolean enabled) { if (mSystemUiProxy != null) {