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