Bug 912376 - SCO wouldn't be dropped after SLC was disconnected, r=btian

This commit is contained in:
Eric Chou 2013-10-03 10:12:46 +08:00
parent 169de0abf1
commit 156307ce2f

View File

@ -1653,14 +1653,8 @@ BluetoothHfpManager::ConnectSco(BluetoothReplyRunnable* aRunnable)
bool bool
BluetoothHfpManager::DisconnectSco() BluetoothHfpManager::DisconnectSco()
{ {
if (!IsConnected()) { if (!IsScoConnected()) {
BT_WARNING("BluetoothHfpManager is not connected"); BT_WARNING("SCO has been already disconnected.");
return false;
}
SocketConnectionStatus status = mScoSocket->GetConnectionStatus();
if (status != SOCKET_CONNECTED && status != SOCKET_CONNECTING) {
BT_WARNING("No SCO exists");
return false; return false;
} }