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

Commit e4c9a16e authored by Phil Burk's avatar Phil Burk Committed by Android (Google) Code Review
Browse files

Merge "MidiService: clear status when device unbound"

parents 872f434e 59a36aeb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -340,6 +340,11 @@ public class MidiService extends IMidiManager.Stub {

                IBinder binder = server.asBinder();
                mDevicesByServer.remove(binder);
                // Clearing mDeviceStatus is needed because setDeviceStatus()
                // relies on finding the device in mDevicesByServer.
                // So the status can no longer be updated after we remove it.
                // Then we can end up with input ports that are stuck open.
                mDeviceStatus = null;

                try {
                    server.closeDevice();