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

Commit 0b92e7dd authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Fix input for embedded surfaces

Fixes bug introduced by recent refactor

Test: b WindowlessWmTest && adb install -r WindowlessWmTest.apk
Change-Id: Ic3853a3097707d49123888d58b0e48c9b29a0bf2
parent 635c8934
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -7719,11 +7719,6 @@ public class WindowManagerService extends IWindowManager.Stub

        mInputManager.registerInputChannel(inputChannel, null /* generate new token */);

        // Prevent the java finalizer from breaking the input channel. But we won't
        // do any further management so we just release the java ref and let the
        // InputDispatcher hold the last ref.
        inputChannel.release();

        InputWindowHandle h = new InputWindowHandle(null, null, displayId);
        h.token = inputChannel.getToken();
        h.name = name;
@@ -7746,5 +7741,10 @@ public class WindowManagerService extends IWindowManager.Stub
        SurfaceControl.Transaction t = new SurfaceControl.Transaction();
        t.setInputWindowInfo(surface, h);
        t.apply();

        // Prevent the java finalizer from breaking the input channel. But we won't
        // do any further management so we just release the java ref and let the
        // InputDispatcher hold the last ref.
        inputChannel.release();
    }
}