Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b991559 authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android (Google) Code Review
Browse files

Merge "Make removeImeSurfaceFromWindow to one-way" into sc-dev

parents 2c973f16 7ec569a5
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2230,9 +2230,7 @@ public final class InputMethodManager {
    public void removeImeSurface(IBinder windowToken) {
        synchronized (mH) {
            try {
                final Completable.Void value = Completable.createVoid();
                mService.removeImeSurfaceFromWindow(windowToken, ResultCallbacks.of(value));
                Completable.getResult(value);
                mService.removeImeSurfaceFromWindowAsync(windowToken);
            } catch (RemoteException e) {
                throw e.rethrowFromSystemServer();
            }
+1 −2
Original line number Diff line number Diff line
@@ -89,8 +89,7 @@ interface IInputMethodManager {
    /** Remove the IME surface. Requires INTERNAL_SYSTEM_WINDOW permission. */
    oneway void removeImeSurface(in IVoidResultCallback resultCallback);
    /** Remove the IME surface. Requires passing the currently focused window. */
    oneway void removeImeSurfaceFromWindow(in IBinder windowToken,
            in IVoidResultCallback resultCallback);
    oneway void removeImeSurfaceFromWindowAsync(in IBinder windowToken);
    oneway void startProtoDump(in byte[] protoDump, int source, String where,
            in IVoidResultCallback resultCallback);
    oneway void isImeTraceEnabled(in IBooleanResultCallback resultCallback);
+4 −7
Original line number Diff line number Diff line
@@ -4100,13 +4100,10 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
    }

    @Override
    public void removeImeSurfaceFromWindow(IBinder windowToken,
            IVoidResultCallback resultCallback) {
        CallbackUtils.onResult(resultCallback, () -> {
    public void removeImeSurfaceFromWindowAsync(IBinder windowToken) {
        // No permission check, because we'll only execute the request if the calling window is
        // also the current IME client.
        mHandler.obtainMessage(MSG_REMOVE_IME_SURFACE_FROM_WINDOW, windowToken).sendToTarget();
        });
    }

    /**
+1 −3
Original line number Diff line number Diff line
@@ -1510,10 +1510,8 @@ public final class MultiClientInputMethodManagerService {

        @BinderThread
        @Override
        public void removeImeSurfaceFromWindow(IBinder windowToken,
                IVoidResultCallback resultCallback) {
        public void removeImeSurfaceFromWindowAsync(IBinder windowToken) {
            reportNotSupported();
            CallbackUtils.onResult(resultCallback, () -> { });
        }

        @BinderThread