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

Commit b3fe7dcb authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Fix incorrect logic to now use a passed in BluetoothDevice when it's...

Merge "Fix incorrect logic to now use a passed in BluetoothDevice when it's not null, not when it's null in A2dpProfile.java" into rvc-dev am: ef226702 am: 4fc9764b am: 6bed6172

Change-Id: I7119365fe42c09ed4bdc73a6316c349568f8703c
parents b7b9c6f2 6bed6172
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -218,7 +218,7 @@ public class A2dpProfile implements LocalBluetoothProfile {
    }

    public boolean supportsHighQualityAudio(BluetoothDevice device) {
        BluetoothDevice bluetoothDevice = (device == null) ? device : mService.getActiveDevice();
        BluetoothDevice bluetoothDevice = (device != null) ? device : mService.getActiveDevice();
        if (bluetoothDevice == null) {
            return false;
        }
@@ -227,7 +227,7 @@ public class A2dpProfile implements LocalBluetoothProfile {
    }

    public boolean isHighQualityAudioEnabled(BluetoothDevice device) {
        BluetoothDevice bluetoothDevice = (device == null) ? device : mService.getActiveDevice();
        BluetoothDevice bluetoothDevice = (device != null) ? device : mService.getActiveDevice();
        if (bluetoothDevice == null) {
            return false;
        }
@@ -253,7 +253,7 @@ public class A2dpProfile implements LocalBluetoothProfile {
    }

    public void setHighQualityAudioEnabled(BluetoothDevice device, boolean enabled) {
        BluetoothDevice bluetoothDevice = (device == null) ? device : mService.getActiveDevice();
        BluetoothDevice bluetoothDevice = (device != null) ? device : mService.getActiveDevice();
        if (bluetoothDevice == null) {
            return;
        }
@@ -272,7 +272,7 @@ public class A2dpProfile implements LocalBluetoothProfile {
    }

    public String getHighQualityAudioOptionLabel(BluetoothDevice device) {
        BluetoothDevice bluetoothDevice = (device == null) ? device : mService.getActiveDevice();
        BluetoothDevice bluetoothDevice = (device != null) ? device : mService.getActiveDevice();
        int unknownCodecId = R.string.bluetooth_profile_a2dp_high_quality_unknown_codec;
        if (bluetoothDevice == null || !supportsHighQualityAudio(device)
                || getConnectionStatus(device) != BluetoothProfile.STATE_CONNECTED) {