Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ff1eb523 authored by Francois Gaffie's avatar Francois Gaffie Committed by Eric Laurent
Browse files

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: default avatarFrancois Gaffie <francois.gaffie@renault.com>
Change-Id: I2663d10f08de3191de4d95bc81749ede9b8a360f
parent 89a23220
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