summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Eric Laurent <elaurent@google.com> 2020-05-14 15:16:52 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-05-14 15:16:52 +0000
commitc12ddbbc0633039d56b86ea48e3ca9ab96a8b09e (patch)
treefbb632445980c336db9f88e06448e36039ebaaf0
parent84e2f0c5821a6bb6d0b945673323879ec67e9cd2 (diff)
parent1dd060f84256e2d4f12f9b7c74b2d3690f091aa3 (diff)
Merge "AudioService BtHelper: fix isBluetoothScoOn()" into rvc-dev
-rw-r--r--services/core/java/com/android/server/audio/BtHelper.java9
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;
}
/**