Bug 819834 - Part 1: The options should be null. r=allstars.chh
authorEdgar Chen <echen@mozilla.com>
Mon, 10 Dec 2012 11:43:03 +0800
changeset 115887 eddc239db46201c974c786aca1eba1fc3ddcd2ee
parent 115886 bc5a2f85d15ea5e57bde618df540a0f0af8cf45c
child 115888 caf2b8ec76f9683b219ff785e7f58a779351b16c
push id24028
push useremorley@mozilla.com
push dateThu, 13 Dec 2012 15:56:02 +0000
treeherdermozilla-central@9db79b97abbb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersallstars.chh
bugs819834
milestone20.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 819834 - Part 1: The options should be null. r=allstars.chh
dom/system/gonk/ril_worker.js
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -5254,22 +5254,27 @@ let RIL = {
 
     let cmdDetails = ctlv.value;
     if (DEBUG) {
       debug("commandNumber = " + cmdDetails.commandNumber +
            " typeOfCommand = " + cmdDetails.typeOfCommand.toString(16) +
            " commandQualifier = " + cmdDetails.commandQualifier);
     }
 
-    let param = StkCommandParamsFactory.createParam(cmdDetails, ctlvs);
-    if (param) {
-      cmdDetails.rilMessageType = "stkcommand";
-      cmdDetails.options = param;
-      RIL.sendDOMMessage(cmdDetails);
-    }
+    // STK_CMD_MORE_TIME need not to propagate event to DOM.
+    if (cmdDetails.typeOfCommand == STK_CMD_MORE_TIME) {
+      RIL.sendStkTerminalResponse({
+        command: cmdDetails,
+        resultCode: STK_RESULT_OK});
+      return;
+    }
+
+    cmdDetails.rilMessageType = "stkcommand";
+    cmdDetails.options = StkCommandParamsFactory.createParam(cmdDetails, ctlvs);
+    RIL.sendDOMMessage(cmdDetails);
   },
 
   /**
    * Send messages to the main thread.
    */
   sendDOMMessage: function sendDOMMessage(message) {
     postMessage(message);
   },
@@ -8145,19 +8150,16 @@ let GsmPDUHelper = {
 
 let StkCommandParamsFactory = {
   createParam: function createParam(cmdDetails, ctlvs) {
     let param;
     switch (cmdDetails.typeOfCommand) {
       case STK_CMD_REFRESH:
         param = this.processRefresh(cmdDetails, ctlvs);
         break;
-      case STK_CMD_MORE_TIME:
-        param = this.processMoreTime(cmdDetails, ctlvs);
-        break;
       case STK_CMD_POLL_INTERVAL:
         param = this.processPollInterval(cmdDetails, ctlvs);
         break;
       case STK_CMD_POLL_OFF:
         param = this.processPollOff(cmdDetails, ctlvs);
         break;
       case STK_CMD_PROVIDE_LOCAL_INFO:
         param = this.processProvideLocalInfo(cmdDetails, ctlvs);
@@ -8212,41 +8214,26 @@ let StkCommandParamsFactory = {
    *        The all TLVs in this proactive command.
    */
   processRefresh: function processRefresh(cmdDetails, ctlvs) {
     let refreshType = cmdDetails.commandQualifier;
     switch (refreshType) {
       case STK_REFRESH_FILE_CHANGE:
       case STK_REFRESH_NAA_INIT_AND_FILE_CHANGE:
         let ctlv = StkProactiveCmdHelper.searchForTag(
-          COMPREHENSIONTLV_FILE_LIST, ctlvs);
+          COMPREHENSIONTLV_TAG_FILE_LIST, ctlvs);
         if (ctlv) {
           let list = ctlv.value.fileList;
           if (DEBUG) {
             debug("Refresh, list = " + list);
           }
           RIL.fetchICCRecords();
         }
         break;
     }
-    return {};
-  },
-
-  /**
-   * Construct a param for MORE TIME.
-   *
-   * @param cmdDetails
-   *        The value object of CommandDetails TLV.
-   * @param ctlvs
-   *        The all TLVs in this proactive command.
-   */
-  processMoreTime: function processMoreTime(cmdDetails, ctlvs) {
-    RIL.sendStkTerminalResponse({
-      command: cmdDetails,
-      resultCode: STK_RESULT_OK});
     return null;
   },
 
   /**
    * Construct a param for Poll Interval.
    *
    * @param cmdDetails
    *        The value object of CommandDetails TLV.
@@ -8270,17 +8257,17 @@ let StkCommandParamsFactory = {
    * Construct a param for Poll Off.
    *
    * @param cmdDetails
    *        The value object of CommandDetails TLV.
    * @param ctlvs
    *        The all TLVs in this proactive command.
    */
   processPollOff: function processPollOff(cmdDetails, ctlvs) {
-    return {};
+    return null;
   },
 
   /**
    * Construct a param for Set Up Event list.
    *
    * @param cmdDetails
    *        The value object of CommandDetails TLV.
    * @param ctlvs