Skip to content
Commit 4e850d1c authored by Jan Sebechlebsky's avatar Jan Sebechlebsky
Browse files

Fix flaky failures when re-registering AudioPolicy.

The failures were caused by mix address being out of sync with
registered mix address because the mix ids were advanced during
unregistration of the mix and access to the mix config config
was not properly synchronized.

This cl:
 * Moves resetting the mix ids (mConfig.reset call) to synchronized
   section.
 * Changes mix counter behavior so it's incremented only during
   registration (and not unregistration) and fixes the comment.
 * Makes mStatusListener, mIsFocusPolicy and mIsTestFocusPolicy final
   since they never change since construction.
 * Removes unnecessary synchronization when accessing mStatusListener
   callback.

Bug: 247788804
Test: atest AudioHostTest --iterations 15
Change-Id: I1544329654cec5c13ec5e20a983d8d318ab3549d
parent 709879dc
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