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

Commit 76c8b452 authored by Hiroki Sato's avatar Hiroki Sato
Browse files

Remove obsolete IMM#setRequestCursorUpdateDisplayIdCheck

This was added in [1] but now that no one uses it.
This CL removes the hidden API.

[1] I9e1f62e3d5d2a385dce8a9633b5b73f8e7f0ccef

Bug: 256926300
Test: Build, device boots.
Flag: EXEMPT cleanup
Change-Id: I4a7e4a858ff1be190abf116bfec0bdee1b309546
parent 0ab05452
Loading
Loading
Loading
Loading
+0 −27
Original line number Diff line number Diff line
@@ -139,7 +139,6 @@ import java.util.Objects;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Consumer;

/**
@@ -4605,32 +4604,6 @@ public final class InputMethodManager {
        return IInputMethodManagerGlobalInvoker.getInputMethodWindowVisibleHeight(mClient);
    }

    /**
     * {@code true} means that
     * {@link RemoteInputConnectionImpl#requestCursorUpdatesInternal(int, int, int)} returns
     * {@code false} when the IME client and the IME run in different displays.
     */
    final AtomicBoolean mRequestCursorUpdateDisplayIdCheck = new AtomicBoolean(true);

    /**
     * Controls the display ID mismatch validation in
     * {@link RemoteInputConnectionImpl#requestCursorUpdatesInternal(int, int, int)}.
     *
     * <p>{@link #updateCursorAnchorInfo(View, CursorAnchorInfo)} is not guaranteed to work
     * correctly when the IME client and the IME run in different displays.  This is why
     * {@link RemoteInputConnectionImpl#requestCursorUpdatesInternal(int, int, int)} returns
     * {@code false} by default when the display ID does not match. This method allows special apps
     * to override this behavior when they are sure that it should work.</p>
     *
     * <p>By default the validation is enabled.</p>
     *
     * @param enabled {@code false} to disable the display ID validation.
     * @hide
     */
    public void setRequestCursorUpdateDisplayIdCheck(boolean enabled) {
        mRequestCursorUpdateDisplayIdCheck.set(enabled);
    }

    /**
     * Force switch to the last used input method and subtype. If the last input method didn't have
     * any subtypes, the framework will simply switch to the last input method with no subtype
+1 −2
Original line number Diff line number Diff line
@@ -1130,8 +1130,7 @@ final class RemoteInputConnectionImpl extends IRemoteInputConnection.Stub {
            Log.w(TAG, "requestCursorUpdates on inactive InputConnection");
            return false;
        }
        if (mParentInputMethodManager.mRequestCursorUpdateDisplayIdCheck.get()
                && mParentInputMethodManager.getDisplayId() != imeDisplayId) {
        if (mParentInputMethodManager.getDisplayId() != imeDisplayId) {
            // requestCursorUpdates() is not currently supported across displays.
            return false;
        }