Skip to content
Commit 0d880628 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

AudioService: check calls to AudioSystem.initStreamVolume

AudioSystem.initStreamVolume initializes the min and max stream
volume indices. The return value was never checked to ensure
success of the call. An unchecked failure could leave min/max
values at -1 in native AudioPolicyManager, which could lead
to no valid volume to be set, and thus no audio would be heard
as a result.
The fix consists in ensuring we retry initializing the stream
volumes whenever an error is detected when calling
the initialization method, or after checking whether the
min/max values are valid after initialization.

Bug: 161950968
Test: adb shell dumpsys audio, check lifecycle section
Change-Id: I3714c0db2a9657a88488635f7d6c78e682f326aa
parent cdb568ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment