Fix flaky AudioFocusTest#testAudioMediaFocusDelayedByCall
When using external focus policy, the caller thread
requesting audio focus for test could be blocked while the
dispatch callback is prioritized. This results in the
client id not being added in time for the dispatch call
resulting in null pointer reference and finally request fail.
Fix it by ensuring the client id is added before handling
the response.
Bug: 303223553
Bug: 302870089
Test: atest -c --rerun-until-failure 1000
AudioFocusTest#testAudioMediaFocusDelayedByCall
Change-Id: I7b2fe8601ca2b502501ee6af64f78d97a5be1f20
Loading
Please register or sign in to comment