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

Commit ccbb7422 authored by Andy Hung's avatar Andy Hung
Browse files

ServiceSingleton: Stricter onNewService callback handling

Enforce onNewService is always called before returning the service
pointer during concurrent access.

Before it was possible two simultaneous service requests for a
service never accessed before, the second thread might get
the service pointer before the onNewService notification
completes (from the first thread).

Flag: EXEMPT bugfix
Test: atest CtsMediaAudioTestCases
Test: atest WvtsDeviceTestCases:com.google.android.wvts.MediaDrmParameterizedTests#testResourceRatingTierNumKeys[L1] --iterations=100 -- --abi arm64-v8a
Test: atest service_singleton_test
Bug: 403676413
Change-Id: I131728929eccab217e8d75e35bdcbc83918723c4
parent 3d4cc887
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