Bug 984327 - Part 1: Include dun apn type in isNetworkTypeSecondaryMobile(...) and elsewhere. r=vicamo, a=1.4+
authorJessica Jong <jjong@mozilla.com>
Wed, 19 Mar 2014 08:39:00 -0400
changeset 192192 03e04f7d561a7dd28685caf1ad715e6c58aea52e
parent 192191 d67ef01f633b551ec6e281cf112704489a701102
child 192193 7568d39b81c5f378b56d95d40281cf64cbce0cef
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvicamo, 1
bugs984327
milestone30.0a2
Bug 984327 - Part 1: Include dun apn type in isNetworkTypeSecondaryMobile(...) and elsewhere. r=vicamo, a=1.4+
dom/system/gonk/NetworkInterfaceListService.js
dom/system/gonk/NetworkManager.js
media/mtransport/gonk_addrs.cpp
--- a/dom/system/gonk/NetworkInterfaceListService.js
+++ b/dom/system/gonk/NetworkInterfaceListService.js
@@ -33,17 +33,20 @@ NetworkInterfaceListService.prototype = 
           excludeSupl: (aConditions &
                         Ci.nsINetworkInterfaceListService.
                         LIST_NOT_INCLUDE_SUPL_INTERFACES) != 0,
           excludeMms: (aConditions &
                        Ci.nsINetworkInterfaceListService.
                        LIST_NOT_INCLUDE_MMS_INTERFACES) != 0,
           excludeIms: (aConditions &
                        Ci.nsINetworkInterfaceListService.
-                       LIST_NOT_INCLUDE_IMS_INTERFACES) != 0
+                       LIST_NOT_INCLUDE_IMS_INTERFACES) != 0,
+          excludeDun: (aConditions &
+                       Ci.nsINetworkInterfaceListService.
+                       LIST_NOT_INCLUDE_DUN_INTERFACES) != 0
         }
       )[0]);
   }
 };
 
 function NetworkInterfaceList (aInterfaces) {
   this._interfaces = aInterfaces;
 }
--- a/dom/system/gonk/NetworkManager.js
+++ b/dom/system/gonk/NetworkManager.js
@@ -447,17 +447,18 @@ NetworkManager.prototype = {
     this._overriddenActive = network;
     this.setAndConfigureActive();
   },
 
 #ifdef MOZ_B2G_RIL
   isNetworkTypeSecondaryMobile: function(type) {
     return (type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_MMS ||
             type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_SUPL ||
-            type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_IMS);
+            type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_IMS ||
+            type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_DUN);
   },
 
   isNetworkTypeMobile: function(type) {
     return (type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE ||
             this.isNetworkTypeSecondaryMobile(type));
   },
 
   setExtraHostRoute: function(network) {
--- a/media/mtransport/gonk_addrs.cpp
+++ b/media/mtransport/gonk_addrs.cpp
@@ -36,17 +36,19 @@ GetInterfaces(std::vector<NetworkInterfa
   // Obtain network interfaces from network manager.
   nsresult rv;
   nsCOMPtr<nsINetworkInterfaceListService> listService =
     do_GetService("@mozilla.org/network/interface-list-service;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   int32_t flags =
     nsINetworkInterfaceListService::LIST_NOT_INCLUDE_SUPL_INTERFACES |
-    nsINetworkInterfaceListService::LIST_NOT_INCLUDE_MMS_INTERFACES;
+    nsINetworkInterfaceListService::LIST_NOT_INCLUDE_MMS_INTERFACES |
+    nsINetworkInterfaceListService::LIST_NOT_INCLUDE_IMS_INTERFACES |
+    nsINetworkInterfaceListService::LIST_NOT_INCLUDE_DUN_INTERFACES;
   nsCOMPtr<nsINetworkInterfaceList> networkList;
   NS_ENSURE_SUCCESS(listService->GetDataInterfaceList(flags,
                                                       getter_AddRefs(networkList)),
                     NS_ERROR_FAILURE);
 
   // Translate nsINetworkInterfaceList to NetworkInterface.
   int32_t listLength;
   NS_ENSURE_SUCCESS(networkList->GetNumberOfInterface(&listLength),