Merge "AudioService BtHelper: fix isBluetoothScoOn()" into rvc-dev
This commit is contained in:
@@ -358,14 +358,11 @@ public class BtHelper {
|
|||||||
* @return false if SCO isn't connected
|
* @return false if SCO isn't connected
|
||||||
*/
|
*/
|
||||||
/*package*/ synchronized boolean isBluetoothScoOn() {
|
/*package*/ synchronized boolean isBluetoothScoOn() {
|
||||||
if ((mBluetoothHeadset != null)
|
if (mBluetoothHeadset == null) {
|
||||||
&& (mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
|
|
||||||
!= BluetoothHeadset.STATE_AUDIO_CONNECTED)) {
|
|
||||||
Log.w(TAG, "isBluetoothScoOn(true) returning false because "
|
|
||||||
+ mBluetoothHeadsetDevice + " is not in audio connected mode");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
|
||||||
|
== BluetoothHeadset.STATE_AUDIO_CONNECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user