diff options
| author | 2020-05-14 15:16:52 +0000 | |
|---|---|---|
| committer | 2020-05-14 15:16:52 +0000 | |
| commit | c12ddbbc0633039d56b86ea48e3ca9ab96a8b09e (patch) | |
| tree | fbb632445980c336db9f88e06448e36039ebaaf0 | |
| parent | 84e2f0c5821a6bb6d0b945673323879ec67e9cd2 (diff) | |
| parent | 1dd060f84256e2d4f12f9b7c74b2d3690f091aa3 (diff) | |
Merge "AudioService BtHelper: fix isBluetoothScoOn()" into rvc-dev
| -rw-r--r-- | services/core/java/com/android/server/audio/BtHelper.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/audio/BtHelper.java b/services/core/java/com/android/server/audio/BtHelper.java index 9e7b428d2cca..b6ffcef8fef0 100644 --- a/services/core/java/com/android/server/audio/BtHelper.java +++ b/services/core/java/com/android/server/audio/BtHelper.java @@ -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; } /** |