Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fda90375 authored by Vlad Popa's avatar Vlad Popa
Browse files

Fix abs volume being enabled for a2dp without avrcp

Flag: com.android.media.audio.abs_volume_index_fix
Test: logs
Bug: 350103953
Change-Id: I68e010d3abb7d24225e374d759fa3abdc3691a23
parent c44566f4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -9909,9 +9909,9 @@ public class AudioService extends IAudioService.Stub
            int a2dpDev = AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP;
            synchronized (mCachedAbsVolDrivingStreamsLock) {
                mCachedAbsVolDrivingStreams.compute(a2dpDev, (dev, stream) -> {
                    if (stream != null && !mAvrcpAbsVolSupported) {
                    if (!mAvrcpAbsVolSupported) {
                        mAudioSystem.setDeviceAbsoluteVolumeEnabled(a2dpDev, /*address=*/
                                "", /*enabled*/false, AudioSystem.DEVICE_NONE);
                                "", /*enabled*/false, AudioSystem.STREAM_DEFAULT);
                        return null;
                    }
                    // For A2DP and AVRCP we need to set the driving stream based on the