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

Commit c46b17ef authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "MidiService: clear status when device unbound" into sc-v2-dev am: da2247fa

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17239105

Change-Id: I8f6018f47d780d2d17e6833b69b82c9f53ee9f08
parents 3b47535d da2247fa
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();