Loading media/java/android/media/AudioManager.java +8 −3 Original line number Original line Diff line number Diff line Loading @@ -1502,11 +1502,16 @@ public class AudioManager { */ */ public boolean isBluetoothA2dpOn() { public boolean isBluetoothA2dpOn() { if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_BLUETOOTH_A2DP,"") if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_BLUETOOTH_A2DP,"") == AudioSystem.DEVICE_STATE_UNAVAILABLE) { == AudioSystem.DEVICE_STATE_AVAILABLE) { return false; return true; } else { } 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 true; } } return false; } } /** /** Loading Loading
media/java/android/media/AudioManager.java +8 −3 Original line number Original line Diff line number Diff line Loading @@ -1502,11 +1502,16 @@ public class AudioManager { */ */ public boolean isBluetoothA2dpOn() { public boolean isBluetoothA2dpOn() { if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_BLUETOOTH_A2DP,"") if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_BLUETOOTH_A2DP,"") == AudioSystem.DEVICE_STATE_UNAVAILABLE) { == AudioSystem.DEVICE_STATE_AVAILABLE) { return false; return true; } else { } 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 true; } } return false; } } /** /** Loading