OSDN Git Service

Add a selected UsbAlsaDevice
authorAndrew Chant <achant@google.com>
Tue, 13 Feb 2018 02:47:26 +0000 (18:47 -0800)
committerAndrew Chant <achant@google.com>
Wed, 14 Feb 2018 00:51:34 +0000 (16:51 -0800)
commit278f4c9a05c75eac73b6a659798266504c95e2a0
tree970c64aefaa9cabaac35fa4d64b1196564e5fa3a
parent07a97da51fc7d43db9903d793d614340b1cf3b67
Add a selected UsbAlsaDevice

Keep track of the currently selected UsbAlsaDevice in a
synchronized manner.
Allow it to notify AudioService that it has been disabled
prior to replacing it with a new Audio Device.

Test: verified audio worked as expected when using
both UAC2 and non-UAC2 3.5mm adapters, with 3.5mm
plugging/unplugging and USB-C plugging/unplugging.

Change-Id: I8b76145490da38d4eec25f4f2bdb6695afa151b9
services/usb/java/com/android/server/usb/UsbAlsaManager.java