Merge "AudioService BtHelper: fix isBluetoothScoOn()" into rvc-dev am: c12ddbbc06

Change-Id: Icffc901b24d7fa6863b820b22e16062b0a540878
This commit is contained in:
Eric Laurent
2020-05-15 15:51:35 +00:00
committed by Automerger Merge Worker

View File

@@ -358,14 +358,11 @@ public class BtHelper {
* @return false if SCO isn't connected
*/
/*package*/ synchronized boolean isBluetoothScoOn() {
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");
if (mBluetoothHeadset == null) {
return false;
}
return true;
return mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
== BluetoothHeadset.STATE_AUDIO_CONNECTED;
}
/**