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

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

libaudiohal@aidl: Enforce thread safety for DeviceHalAidl

Since methods of DeviceHalAidl can be called by the framework
from multiple threads, access to inner data structures must
be serialized. To implement this, encapsulate all internal
data structures into a new class 'Hal2AidlMapper', and guard
access to its instance with a mutex.

This split also helps to make the size of DeviceHalAidl
more manageable, and narrow its function to translation
between lecacy and AIDL data structures and then calling
into 'Hal2AidlMapper'.

Thanks to removal of extra code from DeviceHalAidl it has
become easier to unify the code of its entry points.

Bug: 302132812
Bug: 303742495
Test: atest CtsMediaAudioTestCases
Change-Id: I4d14177445005fd5138e297eddd218e98ad2acd3
parent 61ff90cc
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