AudioPolicyManager:Fix that the track of start in a call does not
switch devices correctly after the call hangs up.
When the SIM card call is disconnected and the setPhoneState function
is called to reselect the device for tracks that were started during
the call, calling the getNewOutputDevices function with the parameter
fromCache set to true may result in unexpected device selection in
certain situations.
For example: During a SIM card call, an alarm sounds. At this point,
the alarm uses the earpiece as the playback device. After ending the
call, when setPhoneState is called here to select the output device
for the alarm playback, due to fromCache being set to true, the selected
device remains the earpiece rather than the expected speaker.
Bug: 434552765
Flag: EXEMPT bugfix
Test: atest audiopolicy_tests
Change-Id: I9cd6145d78699c1afb0499dc281d7b7864779c5a
Signed-off-by:
panhao1 <panhao1@xiaomi.corp-partner.google.com>
Loading
Please register or sign in to comment