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

Skip to content
Commit 43a85cfb authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

audio: Add a helper class to simplify legacy HALs migration

Since in the C and HIDL APIs the method for opening a stream
receives the device to connect to, some legacy HAL implementations
took an advantage of that. In AIDL APIs device port connection
process is more dynamic and independent of the stream creation.

To simplify porting of legacy implementations to AIDL, a helper
class StreamSwitcher is added. It emulates the legacy behavior
by allowing to postpone the stream implementation creation until
the connected device is known. Until that moment, it exposes
to the client a stub implementation of the stream interface.

Bug: 264712385
Bug: 286914845
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ie8ae0338fd22f705e00a34e56a7fa235eda5ed9e
parent 1eedc130
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