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

Commit 02facb90 authored by Eric Laurent's avatar Eric Laurent
Browse files

AudioService: fix cross deadlock

Commit 5bbcd44c introduced a cross deadlock between
AudioDeviceBrocker.mDeviceStateLock and VolumeStreamState.class
by locking VolumeStreamState.class before calling
mDeviceBroker.isAvrcpAbsoluteVolumeSupported().

Bug: 132098030
Test: make
Change-Id: Ia6e6e1e407a2ddcff7931d508fc142ee8ee652b9
parent 35231f7f
Loading
Loading
Loading
Loading
+10 −12
Original line number Diff line number Diff line
@@ -4919,7 +4919,6 @@ public class AudioService extends IAudioService.Stub
    }

    private void onSetVolumeIndexOnDevice(@NonNull DeviceVolumeUpdate update) {
        synchronized (VolumeStreamState.class) {
        final VolumeStreamState streamState = mStreamStates[update.mStreamType];
        if (update.hasVolumeIndex()) {
            final int index = update.getVolumeIndex();
@@ -4932,7 +4931,6 @@ public class AudioService extends IAudioService.Stub
        }
        setDeviceVolume(streamState, update.mDevice);
    }
    }

    /*package*/ void setDeviceVolume(VolumeStreamState streamState, int device) {