Bug 859727 - Remove routing logic from BluetoothScoManager, r=echou, r=rlin
--- a/dom/bluetooth/BluetoothScoManager.cpp
+++ b/dom/bluetooth/BluetoothScoManager.cpp
@@ -78,23 +78,21 @@ BluetoothScoManager::NotifyAudioManager(
do_GetService("@mozilla.org/telephony/audiomanager;1");
NS_ENSURE_TRUE_VOID(am);
if (aAddress.IsEmpty()) {
if (NS_FAILED(obs->NotifyObservers(nullptr, BLUETOOTH_SCO_STATUS_CHANGED, nullptr))) {
NS_WARNING("Failed to notify bluetooth-sco-status-changed observsers!");
return;
}
- am->SetForceForUse(am->USE_COMMUNICATION, am->FORCE_NONE);
} else {
if (NS_FAILED(obs->NotifyObservers(nullptr, BLUETOOTH_SCO_STATUS_CHANGED, aAddress.BeginReading()))) {
NS_WARNING("Failed to notify bluetooth-sco-status-changed observsers!");
return;
}
- am->SetForceForUse(am->USE_COMMUNICATION, am->FORCE_BT_SCO);
}
}
NS_IMPL_ISUPPORTS1(BluetoothScoManagerObserver, nsIObserver)
namespace {
StaticAutoPtr<BluetoothScoManager> gBluetoothScoManager;
StaticRefPtr<BluetoothScoManagerObserver> sScoObserver;