Bug 818353 - Part 3: DOM changes - use default client id (0) in BT. r=gyeh
authorJessica Jong <jjong@mozilla.com>
Fri, 18 Oct 2013 15:01:03 +0800
changeset 165069 033a0cdb8c03439a90da7b132d3557703a1703e3
parent 165068 c6a0d5f696ecd86cb320aaeafa487be06eb825f1
child 165070 3867f316204ee309a436e93bb912267aeac783bb
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgyeh
bugs818353
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 818353 - Part 3: DOM changes - use default client id (0) in BT. r=gyeh
dom/bluetooth/BluetoothHfpManager.cpp
dom/bluetooth/BluetoothRilListener.cpp
--- a/dom/bluetooth/BluetoothHfpManager.cpp
+++ b/dom/bluetooth/BluetoothHfpManager.cpp
@@ -556,17 +556,18 @@ BluetoothHfpManager::HandleVolumeChanged
 void
 BluetoothHfpManager::HandleVoiceConnectionChanged()
 {
   nsCOMPtr<nsIMobileConnectionProvider> connection =
     do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
   NS_ENSURE_TRUE_VOID(connection);
 
   nsCOMPtr<nsIDOMMozMobileConnectionInfo> voiceInfo;
-  connection->GetVoiceConnectionInfo(getter_AddRefs(voiceInfo));
+  // TODO: Bug 921991 - B2G BT: support multiple sim cards
+  connection->GetVoiceConnectionInfo(0, getter_AddRefs(voiceInfo));
   NS_ENSURE_TRUE_VOID(voiceInfo);
 
   nsString type;
   voiceInfo->GetType(type);
   mPhoneType = GetPhoneType(type);
 
   bool roaming;
   voiceInfo->GetRoaming(&roaming);
@@ -592,17 +593,18 @@ BluetoothHfpManager::HandleVoiceConnecti
 
   /**
    * Possible return values for mode are:
    * - null (unknown): set mNetworkSelectionMode to 0 (auto)
    * - automatic: set mNetworkSelectionMode to 0 (auto)
    * - manual: set mNetworkSelectionMode to 1 (manual)
    */
   nsString mode;
-  connection->GetNetworkSelectionMode(mode);
+  // TODO: Bug 921991 - B2G BT: support multiple sim cards
+  connection->GetNetworkSelectionMode(0, mode);
   if (mode.EqualsLiteral("manual")) {
     mNetworkSelectionMode = 1;
   } else {
     mNetworkSelectionMode = 0;
   }
 
   nsCOMPtr<nsIDOMMozMobileNetworkInfo> network;
   voiceInfo->GetNetwork(getter_AddRefs(network));
--- a/dom/bluetooth/BluetoothRilListener.cpp
+++ b/dom/bluetooth/BluetoothRilListener.cpp
@@ -287,30 +287,32 @@ BluetoothRilListener::StopIccListening()
 
 bool
 BluetoothRilListener::StartMobileConnectionListening()
 {
   nsCOMPtr<nsIMobileConnectionProvider> provider =
     do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
   NS_ENSURE_TRUE(provider, false);
 
+  // TODO: Bug 921991 - B2G BT: support multiple sim cards
   nsresult rv = provider->
-                  RegisterMobileConnectionMsg(mMobileConnectionListener);
+                  RegisterMobileConnectionMsg(0, mMobileConnectionListener);
   return NS_SUCCEEDED(rv);
 }
 
 bool
 BluetoothRilListener::StopMobileConnectionListening()
 {
   nsCOMPtr<nsIMobileConnectionProvider> provider =
     do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
   NS_ENSURE_TRUE(provider, false);
 
+  // TODO: Bug 921991 - B2G BT: support multiple sim cards
   nsresult rv = provider->
-                  UnregisterMobileConnectionMsg(mMobileConnectionListener);
+                  UnregisterMobileConnectionMsg(0, mMobileConnectionListener);
   return NS_SUCCEEDED(rv);
 }
 
 bool
 BluetoothRilListener::StartTelephonyListening()
 {
   nsCOMPtr<nsITelephonyProvider> provider =
     do_GetService(TELEPHONY_PROVIDER_CONTRACTID);