Loading
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