Bug 973771 - Part 1: RIL implementation for LTE preferred network types. r=hsinyi
authorEdgar Chen <echen@mozilla.com>
Tue, 18 Feb 2014 14:21:09 +0800
changeset 170511 7470b2696fb4ee02c4e8ac212d63926e9130f5ab
parent 170510 18c235dd757c978bef5768701e78d37e06d74f52
child 170512 9b820751dd528621dfeba4083b01de1e16caf324
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewershsinyi
bugs973771
milestone30.0a1
Bug 973771 - Part 1: RIL implementation for LTE preferred network types. r=hsinyi
dom/mobileconnection/interfaces/nsIDOMMobileConnection.idl
dom/system/gonk/ril_consts.js
--- a/dom/mobileconnection/interfaces/nsIDOMMobileConnection.idl
+++ b/dom/mobileconnection/interfaces/nsIDOMMobileConnection.idl
@@ -138,18 +138,19 @@ interface nsIDOMMozMobileConnection : ns
   nsIDOMDOMRequest selectNetworkAutomatically();
 
   /**
    * Set preferred network type
    *
    * @param type
    *        DOMString indicates the desired preferred network type.
    *        Possible values: 'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto',
-   *                         'cdma/evdo', 'cdma', 'evdo', or
-   *                         'wcdma/gsm/cdma/evdo'.
+   *                         'cdma/evdo', 'cdma', 'evdo', 'wcdma/gsm/cdma/evdo',
+   *                         'lte/cdma/evdo', 'lte/wcdma/gsm',
+   *                         'lte/wcdma/gsm/cdma/evdo' or 'lte'.
    *
    * If successful, the request's onsuccess will be called.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * 'InvalidParameter', 'ModeNotSupported' or 'GenericFailure'
    *
    * TODO: param "type" should be a WebIDL enum when this interface is converted
@@ -158,17 +159,18 @@ interface nsIDOMMozMobileConnection : ns
   nsIDOMDOMRequest setPreferredNetworkType(in DOMString type);
 
   /**
    * Query current preferred network type
    *
    * If successful, the request's onsuccess will be called. And the request's
    * result will be a string indicating the current preferred network type.
    * The value will be either 'wcdma/gsm', 'gsm', 'wcdma', 'wcdma/gsm-auto',
-   * 'cdma/evdo', 'cdma', 'evdo', or 'wcdma/gsm/cdma/evdo'.
+   * 'cdma/evdo', 'cdma', 'evdo', 'wcdma/gsm/cdma/evdo', 'lte/cdma/evdo',
+   * 'lte/wcdma/gsm', 'lte/wcdma/gsm/cdma/evdo' or 'lte'.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * or 'GenericFailure'
    */
   nsIDOMDOMRequest getPreferredNetworkType();
 
   /**
--- a/dom/system/gonk/ril_consts.js
+++ b/dom/system/gonk/ril_consts.js
@@ -407,26 +407,34 @@ this.NETWORK_INFO_MESSAGE_TYPES = [
 this.GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM = "wcdma/gsm";
 this.GECKO_PREFERRED_NETWORK_TYPE_GSM_ONLY = "gsm";
 this.GECKO_PREFERRED_NETWORK_TYPE_WCDMA_ONLY = "wcdma";
 this.GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM_AUTO = "wcdma/gsm-auto";
 this.GECKO_PREFERRED_NETWORK_TYPE_CDMA_EVDO = "cdma/evdo";
 this.GECKO_PREFERRED_NETWORK_TYPE_CDMA_ONLY = "cdma";
 this.GECKO_PREFERRED_NETWORK_TYPE_EVDO_ONLY = "evdo";
 this.GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM_CDMA_EVDO = "wcdma/gsm/cdma/evdo";
+this.GECKO_PREFERRED_NETWORK_TYPE_LTE_CDMA_EVDO = "lte/cdma/evdo";
+this.GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM = "lte/wcdma/gsm";
+this.GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM_CDMA_EVDO = "lte/wcdma/gsm/cdma/evdo";
+this.GECKO_PREFERRED_NETWORK_TYPE_LTE_ONLY = "lte";
 this.GECKO_PREFERRED_NETWORK_TYPE_DEFAULT = GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM;
 this.RIL_PREFERRED_NETWORK_TYPE_TO_GECKO = [
   GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM,
   GECKO_PREFERRED_NETWORK_TYPE_GSM_ONLY,
   GECKO_PREFERRED_NETWORK_TYPE_WCDMA_ONLY,
   GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM_AUTO,
   GECKO_PREFERRED_NETWORK_TYPE_CDMA_EVDO,
   GECKO_PREFERRED_NETWORK_TYPE_CDMA_ONLY,
   GECKO_PREFERRED_NETWORK_TYPE_EVDO_ONLY,
-  GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM_CDMA_EVDO
+  GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM_CDMA_EVDO,
+  GECKO_PREFERRED_NETWORK_TYPE_LTE_CDMA_EVDO,
+  GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM,
+  GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM_CDMA_EVDO,
+  GECKO_PREFERRED_NETWORK_TYPE_LTE_ONLY
 ];
 
 this.GECKO_SUPPORTED_NETWORK_TYPES_DEFAULT = "gsm,wcdma,cdma,evdo";
 this.GECKO_SUPPORTED_NETWORK_TYPES = [
   "gsm",
   "wcdma",
   "cdma",
   "evdo",