Loading core/java/com/android/internal/statusbar/IStatusBarService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ interface IStatusBarService void onNotificationSettingsViewed(String key); void onNotificationBubbleChanged(String key, boolean isBubble, int flags); void onBubbleMetadataFlagChanged(String key, int flags); void hideCurrentInputMethodForBubbles(); void hideCurrentInputMethodForBubbles(int displayId); void grantInlineReplyUriPermission(String key, in Uri uri, in UserHandle user, String packageName); oneway void clearInlineReplyUriPermissions(String key); void onNotificationFeedbackReceived(String key, in Bundle feedback); Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +2 −1 Original line number Diff line number Diff line Loading @@ -553,8 +553,9 @@ public class BubbleController implements ConfigurationChangeListener, * Hides the current input method, wherever it may be focused, via InputMethodManagerInternal. */ void hideCurrentInputMethod() { int displayId = mWindowManager.getDefaultDisplay().getDisplayId(); try { mBarService.hideCurrentInputMethodForBubbles(); mBarService.hideCurrentInputMethodForBubbles(displayId); } catch (RemoteException e) { e.printStackTrace(); } Loading packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ import android.testing.AndroidTestingRunner; import android.testing.TestableLooper; import android.util.Pair; import android.util.SparseArray; import android.view.Display; import android.view.IWindowManager; import android.view.View; import android.view.ViewTreeObserver; Loading Loading @@ -337,6 +338,8 @@ public class BubblesTest extends SysuiTestCase { private NotifPipelineFlags mNotifPipelineFlags; @Mock private Icon mAppBubbleIcon; @Mock private Display mDefaultDisplay; private final SceneTestUtils mUtils = new SceneTestUtils(this); private final TestScope mTestScope = mUtils.getTestScope(); Loading Loading @@ -378,6 +381,7 @@ public class BubblesTest extends SysuiTestCase { when(mColorExtractor.getNeutralColors()).thenReturn(mGradientColors); when(mNotificationShadeWindowView.getViewTreeObserver()) .thenReturn(mock(ViewTreeObserver.class)); when(mWindowManager.getDefaultDisplay()).thenReturn(mDefaultDisplay); FakeDeviceProvisioningRepository deviceProvisioningRepository = Loading services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java +8 −3 Original line number Diff line number Diff line Loading @@ -56,9 +56,13 @@ public abstract class InputMethodManagerInternal { public abstract void setInteractive(boolean interactive); /** * Hides the current input method, if visible. * Hides the input methods for all the users, if visible. * * @param reason the reason for hiding the current input method * @param originatingDisplayId the display ID the request is originated */ public abstract void hideCurrentInputMethod(@SoftInputShowHideReason int reason); public abstract void hideAllInputMethods(@SoftInputShowHideReason int reason, int originatingDisplayId); /** * Returns the list of installed input methods for the specified user. Loading Loading @@ -210,7 +214,8 @@ public abstract class InputMethodManagerInternal { } @Override public void hideCurrentInputMethod(@SoftInputShowHideReason int reason) { public void hideAllInputMethods(@SoftInputShowHideReason int reason, int originatingDisplayId) { } @Override Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +6 −5 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub private static final int MSG_SHOW_IM_SUBTYPE_PICKER = 1; private static final int MSG_HIDE_CURRENT_INPUT_METHOD = 1035; private static final int MSG_HIDE_ALL_INPUT_METHODS = 1035; private static final int MSG_REMOVE_IME_SURFACE = 1060; private static final int MSG_REMOVE_IME_SURFACE_FROM_WINDOW = 1061; private static final int MSG_UPDATE_IME_WINDOW_STATUS = 1070; Loading Loading @@ -4835,7 +4835,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub // --------------------------------------------------------- case MSG_HIDE_CURRENT_INPUT_METHOD: case MSG_HIDE_ALL_INPUT_METHODS: synchronized (ImfLock.class) { final @SoftInputShowHideReason int reason = (int) msg.obj; hideCurrentInputLocked(mCurFocusedWindow, null /* statsToken */, 0 /* flags */, Loading Loading @@ -5591,9 +5591,10 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub } @Override public void hideCurrentInputMethod(@SoftInputShowHideReason int reason) { mHandler.removeMessages(MSG_HIDE_CURRENT_INPUT_METHOD); mHandler.obtainMessage(MSG_HIDE_CURRENT_INPUT_METHOD, reason).sendToTarget(); public void hideAllInputMethods(@SoftInputShowHideReason int reason, int originatingDisplayId) { mHandler.removeMessages(MSG_HIDE_ALL_INPUT_METHODS); mHandler.obtainMessage(MSG_HIDE_ALL_INPUT_METHODS, reason).sendToTarget(); } @Override Loading Loading
core/java/com/android/internal/statusbar/IStatusBarService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ interface IStatusBarService void onNotificationSettingsViewed(String key); void onNotificationBubbleChanged(String key, boolean isBubble, int flags); void onBubbleMetadataFlagChanged(String key, int flags); void hideCurrentInputMethodForBubbles(); void hideCurrentInputMethodForBubbles(int displayId); void grantInlineReplyUriPermission(String key, in Uri uri, in UserHandle user, String packageName); oneway void clearInlineReplyUriPermissions(String key); void onNotificationFeedbackReceived(String key, in Bundle feedback); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +2 −1 Original line number Diff line number Diff line Loading @@ -553,8 +553,9 @@ public class BubbleController implements ConfigurationChangeListener, * Hides the current input method, wherever it may be focused, via InputMethodManagerInternal. */ void hideCurrentInputMethod() { int displayId = mWindowManager.getDefaultDisplay().getDisplayId(); try { mBarService.hideCurrentInputMethodForBubbles(); mBarService.hideCurrentInputMethodForBubbles(displayId); } catch (RemoteException e) { e.printStackTrace(); } Loading
packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ import android.testing.AndroidTestingRunner; import android.testing.TestableLooper; import android.util.Pair; import android.util.SparseArray; import android.view.Display; import android.view.IWindowManager; import android.view.View; import android.view.ViewTreeObserver; Loading Loading @@ -337,6 +338,8 @@ public class BubblesTest extends SysuiTestCase { private NotifPipelineFlags mNotifPipelineFlags; @Mock private Icon mAppBubbleIcon; @Mock private Display mDefaultDisplay; private final SceneTestUtils mUtils = new SceneTestUtils(this); private final TestScope mTestScope = mUtils.getTestScope(); Loading Loading @@ -378,6 +381,7 @@ public class BubblesTest extends SysuiTestCase { when(mColorExtractor.getNeutralColors()).thenReturn(mGradientColors); when(mNotificationShadeWindowView.getViewTreeObserver()) .thenReturn(mock(ViewTreeObserver.class)); when(mWindowManager.getDefaultDisplay()).thenReturn(mDefaultDisplay); FakeDeviceProvisioningRepository deviceProvisioningRepository = Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java +8 −3 Original line number Diff line number Diff line Loading @@ -56,9 +56,13 @@ public abstract class InputMethodManagerInternal { public abstract void setInteractive(boolean interactive); /** * Hides the current input method, if visible. * Hides the input methods for all the users, if visible. * * @param reason the reason for hiding the current input method * @param originatingDisplayId the display ID the request is originated */ public abstract void hideCurrentInputMethod(@SoftInputShowHideReason int reason); public abstract void hideAllInputMethods(@SoftInputShowHideReason int reason, int originatingDisplayId); /** * Returns the list of installed input methods for the specified user. Loading Loading @@ -210,7 +214,8 @@ public abstract class InputMethodManagerInternal { } @Override public void hideCurrentInputMethod(@SoftInputShowHideReason int reason) { public void hideAllInputMethods(@SoftInputShowHideReason int reason, int originatingDisplayId) { } @Override Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +6 −5 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub private static final int MSG_SHOW_IM_SUBTYPE_PICKER = 1; private static final int MSG_HIDE_CURRENT_INPUT_METHOD = 1035; private static final int MSG_HIDE_ALL_INPUT_METHODS = 1035; private static final int MSG_REMOVE_IME_SURFACE = 1060; private static final int MSG_REMOVE_IME_SURFACE_FROM_WINDOW = 1061; private static final int MSG_UPDATE_IME_WINDOW_STATUS = 1070; Loading Loading @@ -4835,7 +4835,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub // --------------------------------------------------------- case MSG_HIDE_CURRENT_INPUT_METHOD: case MSG_HIDE_ALL_INPUT_METHODS: synchronized (ImfLock.class) { final @SoftInputShowHideReason int reason = (int) msg.obj; hideCurrentInputLocked(mCurFocusedWindow, null /* statsToken */, 0 /* flags */, Loading Loading @@ -5591,9 +5591,10 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub } @Override public void hideCurrentInputMethod(@SoftInputShowHideReason int reason) { mHandler.removeMessages(MSG_HIDE_CURRENT_INPUT_METHOD); mHandler.obtainMessage(MSG_HIDE_CURRENT_INPUT_METHOD, reason).sendToTarget(); public void hideAllInputMethods(@SoftInputShowHideReason int reason, int originatingDisplayId) { mHandler.removeMessages(MSG_HIDE_ALL_INPUT_METHODS); mHandler.obtainMessage(MSG_HIDE_ALL_INPUT_METHODS, reason).sendToTarget(); } @Override Loading