Bug 898445 - Part 3: Bluetooth changes for MobileConnection webidl. r=echou

This commit is contained in:
Edgar Chen 2014-02-25 18:01:23 +08:00
parent 9c64a4a3e3
commit 529a07f45e
3 changed files with 10 additions and 8 deletions

View File

@ -7,7 +7,7 @@
#include "BluetoothRilListener.h"
#include "BluetoothHfpManager.h"
#include "nsIDOMMobileConnection.h"
#include "nsIMobileConnectionInfo.h"
#include "nsIRadioInterfaceLayer.h"
#include "nsRadioInterfaceLayer.h"
#include "nsServiceManagerUtils.h"
@ -350,7 +350,7 @@ BluetoothRilListener::SelectClient()
NS_ENSURE_TRUE_VOID(connection);
for (uint32_t i = 0; i < mMobileConnListeners.Length(); i++) {
nsCOMPtr<nsIDOMMozMobileConnectionInfo> voiceInfo;
nsCOMPtr<nsIMobileConnectionInfo> voiceInfo;
connection->GetVoiceConnectionInfo(i, getter_AddRefs(voiceInfo));
if (!voiceInfo) {
BT_WARNING("%s: Failed to get voice connection info", __FUNCTION__);

View File

@ -17,9 +17,10 @@
#include "nsContentUtils.h"
#include "nsIAudioManager.h"
#include "nsIDOMIccInfo.h"
#include "nsIDOMMobileConnection.h"
#include "nsIIccProvider.h"
#include "nsIMobileConnectionInfo.h"
#include "nsIMobileConnectionProvider.h"
#include "nsIMobileNetworkInfo.h"
#include "nsIObserverService.h"
#include "nsISettingsService.h"
#include "nsITelephonyProvider.h"
@ -893,7 +894,7 @@ BluetoothHfpManager::HandleVoiceConnectionChanged(uint32_t aClientId)
do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
NS_ENSURE_TRUE_VOID(connection);
nsCOMPtr<nsIDOMMozMobileConnectionInfo> voiceInfo;
nsCOMPtr<nsIMobileConnectionInfo> voiceInfo;
connection->GetVoiceConnectionInfo(aClientId, getter_AddRefs(voiceInfo));
NS_ENSURE_TRUE_VOID(voiceInfo);
@ -928,7 +929,7 @@ BluetoothHfpManager::HandleVoiceConnectionChanged(uint32_t aClientId)
UpdateDeviceCIND();
// Operator name
nsCOMPtr<nsIDOMMozMobileNetworkInfo> network;
nsCOMPtr<nsIMobileNetworkInfo> network;
voiceInfo->GetNetwork(getter_AddRefs(network));
NS_ENSURE_TRUE_VOID(network);
network->GetLongName(mOperatorName);

View File

@ -26,9 +26,10 @@
#ifdef MOZ_B2G_RIL
#include "nsIDOMIccInfo.h"
#include "nsIDOMMobileConnection.h"
#include "nsIIccProvider.h"
#include "nsIMobileConnectionInfo.h"
#include "nsIMobileConnectionProvider.h"
#include "nsIMobileNetworkInfo.h"
#include "nsITelephonyProvider.h"
#include "nsRadioInterfaceLayer.h"
#endif
@ -609,7 +610,7 @@ BluetoothHfpManager::HandleVoiceConnectionChanged(uint32_t aClientId)
do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
NS_ENSURE_TRUE_VOID(connection);
nsCOMPtr<nsIDOMMozMobileConnectionInfo> voiceInfo;
nsCOMPtr<nsIMobileConnectionInfo> voiceInfo;
connection->GetVoiceConnectionInfo(aClientId, getter_AddRefs(voiceInfo));
NS_ENSURE_TRUE_VOID(voiceInfo);
@ -652,7 +653,7 @@ BluetoothHfpManager::HandleVoiceConnectionChanged(uint32_t aClientId)
mNetworkSelectionMode = 0;
}
nsCOMPtr<nsIDOMMozMobileNetworkInfo> network;
nsCOMPtr<nsIMobileNetworkInfo> network;
voiceInfo->GetNetwork(getter_AddRefs(network));
NS_ENSURE_TRUE_VOID(network);
network->GetLongName(mOperatorName);