Closed Bug 1226483 Opened 4 years ago Closed 4 years ago

Add ASSERT check to AudioManager::SelectDeviceFromDevices()

Categories

(Firefox OS Graveyard :: AudioChannel, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(firefox45 fixed)

RESOLVED FIXED
2.6 S1 - 11/20
Tracking Status
firefox45 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file)

It seems better to check if AudioManager::SelectDeviceFromDevices() select one device.
Depends on: 1196724
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
Assignee: nobody → sotaro.ikeda.g
Attachment #8689916 - Flags: review?(alwu)
Attachment #8689916 - Flags: review?(alwu) → review+
https://hg.mozilla.org/mozilla-central/rev/a99df7f5b301
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.6 S1 - 11/20
You need to log in before you can comment on or make changes to this bug.