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

Commit 9b6b49dc authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "AudioService: fix A2DP disconnection / reconnection" am: 2faf009d am:...

Merge "AudioService: fix A2DP disconnection / reconnection" am: 2faf009d am: bb251a1d am: 447391c7

Change-Id: I9c41b9b76a8d741ca7d30f757f3404ac30c9d3a8
parents fee05eb4 447391c7
Loading
Loading
Loading
Loading
+10 −8
Original line number Original line Diff line number Diff line
@@ -241,7 +241,8 @@ public class AudioDeviceInventory {
                } else {
                } else {
                    makeA2dpDeviceUnavailableNow(address, di.mDeviceCodecFormat);
                    makeA2dpDeviceUnavailableNow(address, di.mDeviceCodecFormat);
                }
                }
            }
            } else if (state == BluetoothProfile.STATE_CONNECTED) {
                // device is not already connected
                if (a2dpVolume != -1) {
                if (a2dpVolume != -1) {
                    mDeviceBroker.postSetVolumeIndexOnDevice(AudioSystem.STREAM_MUSIC,
                    mDeviceBroker.postSetVolumeIndexOnDevice(AudioSystem.STREAM_MUSIC,
                            // convert index to internal representation in VolumeStreamState
                            // convert index to internal representation in VolumeStreamState
@@ -252,6 +253,7 @@ public class AudioDeviceInventory {
                        "onSetA2dpSinkConnectionState", a2dpCodec);
                        "onSetA2dpSinkConnectionState", a2dpCodec);
            }
            }
        }
        }
    }


    /*package*/ void onSetA2dpSourceConnectionState(
    /*package*/ void onSetA2dpSourceConnectionState(
            @NonNull BtHelper.BluetoothA2dpDeviceInfo btInfo, int state) {
            @NonNull BtHelper.BluetoothA2dpDeviceInfo btInfo, int state) {