OSDN Git Service

Fixed capture-only devices not removed when disconnected.
authorPaul McLean <pmclean@google.com>
Wed, 28 Oct 2015 19:39:44 +0000 (13:39 -0600)
committerPaul McLean <pmclean@google.com>
Wed, 28 Oct 2015 19:39:44 +0000 (13:39 -0600)
I have brought shame upon my family.

Bug: 24932354
Change-Id: I0fce40a976f40e74f4fd87eb6f4aa93e847032cc

services/usb/java/com/android/server/usb/UsbAlsaManager.java

index 31763e7..701272e 100644 (file)
@@ -439,7 +439,7 @@ public final class UsbAlsaManager {
 
         UsbAudioDevice audioDevice = mAudioDevices.remove(usbDevice);
         if (audioDevice != null) {
-            if (audioDevice.mHasPlayback || audioDevice.mHasPlayback) {
+            if (audioDevice.mHasPlayback || audioDevice.mHasCapture) {
                 notifyDeviceState(audioDevice, false);
 
                 // if there any external devices left, select one of them