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

Skip to content
Commit 9fb6f3dc authored by Andy Hung's avatar Andy Hung
Browse files

AudioSystem: Ensure onNewService callback is complete before returning service

A race condition with two threads starting at identical times
obtaining the AudioFlinger service the very first time may result
in an AudioTrack creation failure because the second thread continues
before the onNewService callback is complete.

Here the second thread will wait for the onNewService to complete.

Flag: EXEMPT bugfix
Test: atest CtsMediaAudioTestCases
Test: atest WvtsDeviceTestCases:com.google.android.wvts.MediaDrmParameterizedTests#testResourceRatingTierNumKeys[L1] --iterations=100 -- --abi arm64-v8a
Bug: 402768417
Change-Id: Id011af3bcc0ff701beb7e986e415913260606669
parent ae8dfbee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment