Bug 961571 - Part 2: Handle ims apn type in RILNetworkInterface. r=hsinyi
authorEdgar Chen <echen@mozilla.com>
Wed, 26 Feb 2014 00:08:00 +0800
changeset 171410 d57fbc7bdd37f9e944244dbfb2c94288820481ce
parent 171409 1f4d436f213a5e634670fbfb07887b61cfa2312c
child 171411 cb047a99c13c6e774672a861426a4923b57feb81
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewershsinyi
bugs961571
milestone30.0a1
Bug 961571 - Part 2: Handle ims apn type in RILNetworkInterface. r=hsinyi
dom/system/gonk/RadioInterfaceLayer.js
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -4209,16 +4209,17 @@ RILNetworkInterface.prototype = {
   NETWORK_STATE_CONNECTED:     Ci.nsINetworkInterface.CONNECTED,
   NETWORK_STATE_DISCONNECTING: Ci.nsINetworkInterface.DISCONNECTING,
   NETWORK_STATE_DISCONNECTED:  Ci.nsINetworkInterface.DISCONNECTED,
 
   NETWORK_TYPE_WIFI:        Ci.nsINetworkInterface.NETWORK_TYPE_WIFI,
   NETWORK_TYPE_MOBILE:      Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE,
   NETWORK_TYPE_MOBILE_MMS:  Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_MMS,
   NETWORK_TYPE_MOBILE_SUPL: Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_SUPL,
+  NETWORK_TYPE_MOBILE_IMS:  Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_IMS,
   // The network manager should only need to add the host route for "other"
   // types, which is the same handling method as the supl type. So let the
   // definition of other types to be the same as the one of supl type.
   NETWORK_TYPE_MOBILE_OTHERS: Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE_SUPL,
 
   /**
    * Standard values for the APN connection retry process
    * Retry funcion: time(secs) = A * numer_of_retries^2 + B
@@ -4241,16 +4242,19 @@ RILNetworkInterface.prototype = {
       return this.NETWORK_TYPE_MOBILE;
     }
     if (this.connectedTypes.indexOf("mms") != -1) {
       return this.NETWORK_TYPE_MOBILE_MMS;
     }
     if (this.connectedTypes.indexOf("supl") != -1) {
       return this.NETWORK_TYPE_MOBILE_SUPL;
     }
+    if (this.connectedTypes.indexOf("ims") != -1) {
+      return this.NETWORK_TYPE_MOBILE_IMS;
+    }
     return this.NETWORK_TYPE_MOBILE_OTHERS;
   },
 
   name: null,
 
   ip: null,
 
   prefixLength: 0,