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

Commit 51936d42 authored by Mike Lockwood's avatar Mike Lockwood Committed by Android (Google) Code Review
Browse files

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

parents 61c9b44c 9c2d34c7
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -426,17 +426,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) {