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
Loading
Please register or sign in to comment