AudioPolicy: remove devices while Sw bridge established
When devices are disconnected while involved in a SwBridge,
the connectAudioSource function may be called while the cache
of the engine has not yet been updated with availability of devices.
This CL forces to retrieve sinkDevices from engine without using
the cache.
It also ensures that Audio Source using Direct Output are also
re routed while sink device has been made UNAVAILABLE then AVAILABLE
again. In this case, no SwOutput will keep track of the AudioSource.
Orphans Audio Source shall be handled independantly.
So far, robustness cases added to the following test.
In some case, fallback on speaker is allowed, in other,
device none is selected while given sink has been made unavailable:
Test: So far: adb shell /data/nativetest64/AudioPolicyEmulatorTests/AudioPolicyEmulatorTests --gtest_filter=AudioPatchTest/AudioModeBridgingTest.
adb shell /data/nativetest64/AudioPolicyEmulatorTests/AudioPolicyEmulatorTests --gtest_filter=AudioSourceTest/AudioSourceBridgingTest.UsingAudioSourceAPI/
Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Change-Id: I2663d10f08de3191de4d95bc81749ede9b8a360f
Merged-In: I2663d10f08de3191de4d95bc81749ede9b8a360f
Loading
Please register or sign in to comment