Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Unified Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java

Issue 2961403003: Improves audio-routing in combination with BT in AppRTCMobile on Android (Closed)
Patch Set: nit Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java
index 9553c8a0f53d2846e553f30dde46eb646dec69f1..10b1a5cbefcff7ec46747a89fa99e1aa23294476 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java
@@ -329,9 +329,11 @@ public class AppRTCBluetoothManager {
// intent ACTION_SCO_AUDIO_STATE_UPDATED and wait for the state to be SCO_AUDIO_STATE_CONNECTED.
bluetoothState = State.SCO_CONNECTING;
audioManager.startBluetoothSco();
+ audioManager.setBluetoothScoOn(true);
scoConnectionAttempts++;
startTimer();
- Log.d(TAG, "startScoAudio done: BT state=" + bluetoothState);
+ Log.d(TAG, "startScoAudio done: BT state=" + bluetoothState + ", "
+ + "SCO is on: " + isScoOn());
return true;
}
@@ -345,8 +347,10 @@ public class AppRTCBluetoothManager {
}
cancelTimer();
audioManager.stopBluetoothSco();
+ audioManager.setBluetoothScoOn(false);
bluetoothState = State.SCO_DISCONNECTING;
- Log.d(TAG, "stopScoAudio done: BT state=" + bluetoothState);
+ Log.d(TAG, "stopScoAudio done: BT state=" + bluetoothState + ", "
+ + "SCO is on: " + isScoOn());
}
/**
@@ -370,7 +374,7 @@ public class AppRTCBluetoothManager {
bluetoothState = State.HEADSET_UNAVAILABLE;
Log.d(TAG, "No connected bluetooth headset");
} else {
- // Always use first device is list. Android only supports one device.
+ // Always use first device in list. Android only supports one device.
bluetoothDevice = devices.get(0);
bluetoothState = State.HEADSET_AVAILABLE;
Log.d(TAG, "Connected bluetooth headset: "
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698