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

Commit eecff1d0 authored by Ajay Panicker's avatar Ajay Panicker Committed by Jack He
Browse files

Synchronize DeviceDisconnect in VolumeManager

Sometimes the device would disconnect when attempting to switch devices
which would cause a Null Pointer Exception.

Bug: 116489958
Test: Sanity test switching between devices
Change-Id: I0cd4eeb82564b69af9164cca9019f9463ac44f06
(cherry picked from commit 4b40a547)
parent f9b54878
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ class AvrcpVolumeManager extends AudioDeviceCallback {
        mCurrentDevice = device;
    }

    void deviceDisconnected(@NonNull BluetoothDevice device) {
    synchronized void deviceDisconnected(@NonNull BluetoothDevice device) {
        d("deviceDisconnected: device=" + device);
        mDeviceMap.remove(device);
    }