Merge "AudioManager: fix isBluetoothA2dpOn()" into nyc-dev
am: dc7ce84095
* commit 'dc7ce840950398518cc116924b173eb7b7f3288a':
AudioManager: fix isBluetoothA2dpOn()
Change-Id: I7df2a9258ef34716a9a34a47bc501619c3d9ead3
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user