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

Commit 2d3346fa authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

Merge "Remove the input consumer surfaces when the consumer is disposed" into...

Merge "Remove the input consumer surfaces when the consumer is disposed" into rvc-dev am: 616fcd81 am: a7f4ee62

Change-Id: Icd01e573cffc88a44e272c63d48ad03649d7c909
parents 1485cfc1 a7f4ee62
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -153,10 +153,11 @@ class InputConsumerImpl implements IBinder.DeathRecipient {
        t.reparent(mInputSurface, wc.getSurfaceControl());
    }

    void disposeChannelsLw() {
    void disposeChannelsLw(SurfaceControl.Transaction t) {
        mService.mInputManager.unregisterInputChannel(mServerChannel);
        mClientChannel.dispose();
        mServerChannel.dispose();
        t.remove(mInputSurface);
        unlinkFromDeathRecipient();
    }

+3 −3
Original line number Diff line number Diff line
@@ -112,8 +112,9 @@ final class InputMonitor {
        @Override
        public void dispose() {
            synchronized (mService.mGlobalLock) {
                disposeChannelsLw();
                disposeChannelsLw(mInputMonitor.mInputTransaction);
                mInputEventReceiver.dispose();
                mInputMonitor.updateInputWindowsLw(true /* force */);
            }
        }
    }
@@ -195,8 +196,7 @@ final class InputMonitor {

    private boolean disposeInputConsumer(InputConsumerImpl consumer) {
        if (consumer != null) {
            consumer.disposeChannelsLw();
            consumer.hide(mInputTransaction);
            consumer.disposeChannelsLw(mInputTransaction);
            return true;
        }
        return false;