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

Commit 78658894 authored by chaviw's avatar chaviw
Browse files

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

Use the correct cast from IBinder to IWindow

Bug: 121122996
Test: mFocusedWindow no longer remains null

Change-Id: Ia208e129a8cce960620c5edd42f55af0d89914fc
parent 8c30fbae
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.