Bug 1164498: Remove |DispatchBluetoothReply| from |BluetoothHfpManger|, r=btian

This patch replaces |DispatchBluetoothReply| in |BluetoothHfpManager|
with corresponding calls to |DispatchReplySuccess| or |DispatchReplyError|.
This commit is contained in:
Thomas Zimmermann 2015-05-19 12:28:38 +02:00
Родитель 0408a58958
Коммит 9001e89a61
1 изменённых файлов: 0 добавлений и 10 удалений

Просмотреть файл

@ -1916,12 +1916,7 @@ BluetoothHfpManager::OnScoConnectSuccess()
{
// For active connection request, we need to reply the DOMRequest
if (mScoRunnable) {
#ifdef MOZ_B2G_BT_API_V2
DispatchReplySuccess(mScoRunnable);
#else
DispatchBluetoothReply(mScoRunnable,
BluetoothValue(true), EmptyString());
#endif
mScoRunnable = nullptr;
}
@ -1935,13 +1930,8 @@ void
BluetoothHfpManager::OnScoConnectError()
{
if (mScoRunnable) {
#ifdef MOZ_B2G_BT_API_V2
DispatchReplyError(mScoRunnable,
NS_LITERAL_STRING("Failed to create SCO socket!"));
#else
NS_NAMED_LITERAL_STRING(replyError, "Failed to create SCO socket!");
DispatchBluetoothReply(mScoRunnable, BluetoothValue(), replyError);
#endif
mScoRunnable = nullptr;
}