Loading core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java +6 −2 Original line number Diff line number Diff line Loading @@ -196,16 +196,20 @@ final class IInputMethodManagerGlobalInvoker { /** * Invokes {@link IInputMethodManager#removeImeSurface()} * * @param displayId display ID from which this request originates * @param exceptionHandler an optional {@link RemoteException} handler */ @AnyThread @RequiresPermission(Manifest.permission.INTERNAL_SYSTEM_WINDOW) static void removeImeSurface(@Nullable Consumer<RemoteException> exceptionHandler) { static void removeImeSurface(int displayId, @Nullable Consumer<RemoteException> exceptionHandler) { final IInputMethodManager service = getService(); if (service == null) { return; } try { service.removeImeSurface(); service.removeImeSurface(displayId); } catch (RemoteException e) { handleRemoteExceptionOrRethrow(e, exceptionHandler); } Loading core/java/android/view/inputmethod/InputMethodManagerGlobal.java +4 −2 Original line number Diff line number Diff line Loading @@ -95,11 +95,13 @@ public class InputMethodManagerGlobal { /** * Invokes {@link IInputMethodManager#removeImeSurface()} * * @param displayId display ID from which this request originates. * @param exceptionHandler an optional {@link RemoteException} handler. */ @AnyThread @RequiresPermission(Manifest.permission.INTERNAL_SYSTEM_WINDOW) public static void removeImeSurface(@Nullable Consumer<RemoteException> exceptionHandler) { IInputMethodManagerGlobalInvoker.removeImeSurface(exceptionHandler); public static void removeImeSurface(int displayId, @Nullable Consumer<RemoteException> exceptionHandler) { IInputMethodManagerGlobalInvoker.removeImeSurface(displayId, exceptionHandler); } } core/java/com/android/internal/view/IInputMethodManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ interface IInputMethodManager { @EnforcePermission("INTERNAL_SYSTEM_WINDOW") @JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = " + "android.Manifest.permission.INTERNAL_SYSTEM_WINDOW)") void removeImeSurface(); void removeImeSurface(int displayId); /** Remove the IME surface. Requires passing the currently focused window. */ oneway void removeImeSurfaceFromWindowAsync(in IBinder windowToken); Loading libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java +4 −4 Original line number Diff line number Diff line Loading @@ -315,7 +315,7 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged } } if (!mImeShowing) { removeImeSurface(); removeImeSurface(mDisplayId); } } } else if (!android.view.inputmethod.Flags.refactorInsetsController() Loading Loading @@ -617,7 +617,7 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged || hasLeash) { t.hide(mImeSourceControl.getLeash()); } removeImeSurface(); removeImeSurface(mDisplayId); ImeTracker.forLogging().onHidden(mStatsToken); } else if (mAnimationDirection == DIRECTION_SHOW && !mCancelled) { ImeTracker.forLogging().onShown(mStatsToken); Loading Loading @@ -671,10 +671,10 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged } } void removeImeSurface() { void removeImeSurface(int displayId) { // Remove the IME surface to make the insets invisible for // non-client controlled insets. InputMethodManagerGlobal.removeImeSurface( InputMethodManagerGlobal.removeImeSurface(displayId, e -> Slog.e(TAG, "Failed to remove IME surface.", e)); } Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayImeControllerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ public class DisplayImeControllerTest extends ShellTestCase { } }, mExecutor) { @Override void removeImeSurface() { } void removeImeSurface(int displayId) { } }.new PerDisplay(DEFAULT_DISPLAY, ROTATION_0); } Loading Loading
core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java +6 −2 Original line number Diff line number Diff line Loading @@ -196,16 +196,20 @@ final class IInputMethodManagerGlobalInvoker { /** * Invokes {@link IInputMethodManager#removeImeSurface()} * * @param displayId display ID from which this request originates * @param exceptionHandler an optional {@link RemoteException} handler */ @AnyThread @RequiresPermission(Manifest.permission.INTERNAL_SYSTEM_WINDOW) static void removeImeSurface(@Nullable Consumer<RemoteException> exceptionHandler) { static void removeImeSurface(int displayId, @Nullable Consumer<RemoteException> exceptionHandler) { final IInputMethodManager service = getService(); if (service == null) { return; } try { service.removeImeSurface(); service.removeImeSurface(displayId); } catch (RemoteException e) { handleRemoteExceptionOrRethrow(e, exceptionHandler); } Loading
core/java/android/view/inputmethod/InputMethodManagerGlobal.java +4 −2 Original line number Diff line number Diff line Loading @@ -95,11 +95,13 @@ public class InputMethodManagerGlobal { /** * Invokes {@link IInputMethodManager#removeImeSurface()} * * @param displayId display ID from which this request originates. * @param exceptionHandler an optional {@link RemoteException} handler. */ @AnyThread @RequiresPermission(Manifest.permission.INTERNAL_SYSTEM_WINDOW) public static void removeImeSurface(@Nullable Consumer<RemoteException> exceptionHandler) { IInputMethodManagerGlobalInvoker.removeImeSurface(exceptionHandler); public static void removeImeSurface(int displayId, @Nullable Consumer<RemoteException> exceptionHandler) { IInputMethodManagerGlobalInvoker.removeImeSurface(displayId, exceptionHandler); } }
core/java/com/android/internal/view/IInputMethodManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ interface IInputMethodManager { @EnforcePermission("INTERNAL_SYSTEM_WINDOW") @JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = " + "android.Manifest.permission.INTERNAL_SYSTEM_WINDOW)") void removeImeSurface(); void removeImeSurface(int displayId); /** Remove the IME surface. Requires passing the currently focused window. */ oneway void removeImeSurfaceFromWindowAsync(in IBinder windowToken); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java +4 −4 Original line number Diff line number Diff line Loading @@ -315,7 +315,7 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged } } if (!mImeShowing) { removeImeSurface(); removeImeSurface(mDisplayId); } } } else if (!android.view.inputmethod.Flags.refactorInsetsController() Loading Loading @@ -617,7 +617,7 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged || hasLeash) { t.hide(mImeSourceControl.getLeash()); } removeImeSurface(); removeImeSurface(mDisplayId); ImeTracker.forLogging().onHidden(mStatsToken); } else if (mAnimationDirection == DIRECTION_SHOW && !mCancelled) { ImeTracker.forLogging().onShown(mStatsToken); Loading Loading @@ -671,10 +671,10 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged } } void removeImeSurface() { void removeImeSurface(int displayId) { // Remove the IME surface to make the insets invisible for // non-client controlled insets. InputMethodManagerGlobal.removeImeSurface( InputMethodManagerGlobal.removeImeSurface(displayId, e -> Slog.e(TAG, "Failed to remove IME surface.", e)); } Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayImeControllerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ public class DisplayImeControllerTest extends ShellTestCase { } }, mExecutor) { @Override void removeImeSurface() { } void removeImeSurface(int displayId) { } }.new PerDisplay(DEFAULT_DISPLAY, ROTATION_0); } Loading