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

Commit 233adb5e 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 am: 2d3346fa

Change-Id: Ic23d7692353968c1d1c91c798cac1be38918a289
parents 200685c7 2d3346fa
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;