Fix flaky CarAudioFocusTest
Modify the scope of locks in requestAudioFocus in AudioManager so that method dispatchFocusResut FromExtPolicy is called only after clientId has been already added into mFocusRequestsAwaitingResult. Meanwhile, increase EXT_FOCUS_POLICY_TIMEOUT_MS time since the method notifyResult sometimes reaches 200ms timeout when the emulator device is slow. Bug: 234467798 Test: m -j Test: atest CarAudioFocusTest AudioFocusTest Test: atest com.android.car.audio Change-Id: I0198549bbae0b4e78523e244962a71a24be4dde8
Loading
Please register or sign in to comment