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

Commit 11f2e89b 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: 3dd6df6c am: 4e7942a9

Change-Id: I9f43ebc4777b83c573901c6ac1718962ca41e7d4
parents 6a3cfe85 4e7942a9
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;