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

Commit 98bb5d4d authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Fixed IBinder cast to IWindow for mFocusedWindow (1/3)"

parents cf42497a 78658894
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -1761,14 +1761,13 @@ public class InputManagerService extends IInputManager.Stub

    // Native callback
    private void notifyFocusChanged(IBinder token) {
        if (mFocusedWindow != token) {
            if (mFocusedWindowHasCapture) {
                setPointerCapture(false);
            }
            if (token instanceof IWindow) {
                mFocusedWindow = (IWindow) token;
            }
        if (mFocusedWindow.asBinder() == token) {
            Log.w(TAG, "notifyFocusChanged called with unchanged mFocusedWindow=" + mFocusedWindow);
            return;
        }

        setPointerCapture(false);
        mFocusedWindow = IWindow.Stub.asInterface(token);
    }

    // Native callback.