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

Commit cc52ca35 authored by Eric Laurent's avatar Eric Laurent Committed by android-build-merger
Browse files

Merge "AudioManager: fix isBluetoothA2dpOn()" into nyc-dev am: dc7ce840

am: bdf90a2d

* commit 'bdf90a2d':
  AudioManager: fix isBluetoothA2dpOn()

Change-Id: I4f1410e6862e8ae9bfd288d4404bedab387237a7
parents 7e0be66c bdf90a2d
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -1502,11 +1502,16 @@ public class AudioManager {
     */
    public boolean isBluetoothA2dpOn() {
        if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_BLUETOOTH_A2DP,"")
            == AudioSystem.DEVICE_STATE_UNAVAILABLE) {
            return false;
        } else {
                == AudioSystem.DEVICE_STATE_AVAILABLE) {
            return true;
        } else if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES,"")
                == AudioSystem.DEVICE_STATE_AVAILABLE) {
            return true;
        } else if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER,"")
                == AudioSystem.DEVICE_STATE_AVAILABLE) {
            return true;
        }
        return false;
    }

    /**