зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1203046 - Call |NRECNotification| once RFCOMM is connected. r=shuang
This commit is contained in:
Родитель
948e27e61b
Коммит
2a1c15bc8c
|
@ -1399,9 +1399,7 @@ BluetoothHfpManager::ConnectionStateNotification(
|
||||||
|
|
||||||
} else if (aState == HFP_CONNECTION_STATE_CONNECTED) {
|
} else if (aState == HFP_CONNECTION_STATE_CONNECTED) {
|
||||||
// Once RFCOMM is connected, enable NREC before each new SLC connection
|
// Once RFCOMM is connected, enable NREC before each new SLC connection
|
||||||
mNrecEnabled = HFP_NREC_STARTED;
|
NRECNotification(HFP_NREC_STARTED, mDeviceAddress);
|
||||||
NotifyConnectionStateChanged(
|
|
||||||
NS_LITERAL_STRING(BLUETOOTH_HFP_NREC_STATUS_CHANGED_ID));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1478,6 +1476,12 @@ BluetoothHfpManager::DtmfNotification(char aDtmf, const nsAString& aBdAddress)
|
||||||
NotifyDialer(NS_ConvertUTF8toUTF16(message));
|
NotifyDialer(NS_ConvertUTF8toUTF16(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NREC status will be set when:
|
||||||
|
* 1. Get an AT command from HF device.
|
||||||
|
* (Bluetooth HFP spec v1.6 merely defines for the "Disable" part.)
|
||||||
|
* 2. Once RFCOMM is connected, enable NREC before each new SLC connection.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
BluetoothHfpManager::NRECNotification(BluetoothHandsfreeNRECState aNrec,
|
BluetoothHfpManager::NRECNotification(BluetoothHandsfreeNRECState aNrec,
|
||||||
const nsAString& aBdAddr)
|
const nsAString& aBdAddr)
|
||||||
|
@ -1488,7 +1492,6 @@ BluetoothHfpManager::NRECNotification(BluetoothHandsfreeNRECState aNrec,
|
||||||
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
|
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
|
||||||
NS_ENSURE_TRUE_VOID(obs);
|
NS_ENSURE_TRUE_VOID(obs);
|
||||||
|
|
||||||
// Set NREC status once getting AT command
|
|
||||||
mNrecEnabled = static_cast<bool>(aNrec);
|
mNrecEnabled = static_cast<bool>(aNrec);
|
||||||
|
|
||||||
// Notify audio manager
|
// Notify audio manager
|
||||||
|
|
Загрузка…
Ссылка в новой задаче