Closed Bug 1226483 Opened 4 years ago Closed 4 years ago
Add ASSERT check to Audio
Manager::Select Device From Devices()
It seems better to check if AudioManager::SelectDeviceFromDevices() select one device.
AudioPolicyManager::setStreamVolumeIndex() expects that the argument has only one output device. It is actually checked by calling audio_is_output_device(). http://androidxref.com/5.1.0_r1/xref/frameworks/av/services/audiopolicy/AudioPolicyManager.cpp#1817 It seems better to check if SelectDeviceFromDevices() always return one device.
audio_is_output_device() is defined in audio.h. http://androidxref.com/5.1.0_r1/xref/system/core/include/system/audio.h#1020
You need to log in before you can comment on or make changes to this bug.