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

This commit is contained in:
Eric Laurent
2020-05-14 15:16:52 +00:00
committed by Android (Google) Code Review

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;
}
/**