Loading
Switch the order of calls in setStreamVolume
The setStreamVolume implementation has a different order of execution than adjustStreamVolume. The postSetLeVolume is called first followed by setting the index on the VSS and lastly the mute state is adjusted. This could lead to a race condition when the LeService is checking the mute state of the stream that is changing volume. Adjusted the order of calls in setStreamVolume to match the one in adjusStreamVolume. The calls into the BT stack are called after the index and mute state is adjusted. Test: adb shell device_config put media_audio com.android.media.audio.volume_refactoring true Test: manual & atest AudioManagerTests Bug: 329202581 Change-Id: I66e2a9f390725a0cafca779436e507f5321a0ece