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

Commit 5242e7a9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Simplify IMMS#reportPerceptibleAsync()"

parents 56e87c7d aff7c622
Loading
Loading
Loading
Loading
+4 −11
Original line number Diff line number Diff line
@@ -3424,19 +3424,12 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
    public void reportPerceptibleAsync(IBinder windowToken, boolean perceptible) {
        Objects.requireNonNull(windowToken, "windowToken must not be null");
        synchronized (ImfLock.class) {
            if (!calledFromValidUserLocked()) {
            if (mCurFocusedWindow != windowToken || mCurPerceptible == perceptible) {
                return;
            }
            final long ident = Binder.clearCallingIdentity();
            try {
                if (mCurFocusedWindow == windowToken
                        && mCurPerceptible != perceptible) {
            mCurPerceptible = perceptible;
                    updateSystemUiLocked(mImeWindowVis, mBackDisposition);
                }
            } finally {
                Binder.restoreCallingIdentity(ident);
            }
            Binder.withCleanCallingIdentity(() ->
                    updateSystemUiLocked(mImeWindowVis, mBackDisposition));
        }
    }