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

Commit 9c2d34c7 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

UsbAlsaManager: Don't reselect current USB audio device on all USB disconnects

Change-Id: I4d3a0d803a6d1eb02ff48a7e8587a1ff6c66a500
parent 6c67474d
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -410,17 +410,16 @@ public final class UsbAlsaManager {
        if (audioDevice != null) {
            if (audioDevice.mHasPlayback || audioDevice.mHasPlayback) {
                notifyDeviceState(audioDevice, false);
                mSelectedAudioDevice = null;

                // if there any external devices left, select one of them
                selectDefaultDevice();
            }
        }
        UsbMidiDevice usbMidiDevice = mMidiDevices.remove(usbDevice);
        if (usbMidiDevice != null) {
            IoUtils.closeQuietly(usbMidiDevice);
        }

        mSelectedAudioDevice = null;

        // if there any external devices left, select one of them
        selectDefaultDevice();
    }

   /* package */ void setAccessoryAudioState(boolean enabled, int card, int device) {