Bug 1172873 - Suppress the notification of STK proactive command if there is no Icc detected. r=echen
authorBevis Tseng <btseng@mozilla.com>
Wed, 10 Jun 2015 11:58:01 +0800
changeset 248095 42b66e48e0c74fb25406de85051340050a4bc2be
parent 248094 23450c433423332a256d9599356cf1596b815620
child 248096 1d3c6e61c651bbc8d3c6bf382bfd25b4e382a194
push id60888
push userkwierso@gmail.com
push dateThu, 11 Jun 2015 01:38:38 +0000
treeherdermozilla-inbound@39e638ed06bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersechen
bugs1172873
milestone41.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 1172873 - Suppress the notification of STK proactive command if there is no Icc detected. r=echen
dom/icc/gonk/IccService.js
--- a/dom/icc/gonk/IccService.js
+++ b/dom/icc/gonk/IccService.js
@@ -134,16 +134,21 @@ IccService.prototype = {
    */
   notifyStkCommand: function(aServiceId, aStkcommand) {
     if (DEBUG) {
       debug("notifyStkCommand for service Id: " + aServiceId);
     }
 
     let icc = this.getIccByServiceId(aServiceId);
 
+    if (!icc.iccInfo || !icc.iccInfo.iccid) {
+      debug("Warning: got STK command when iccid is invalid.");
+      return;
+    }
+
     gIccMessenger.notifyStkProactiveCommand(icc.iccInfo.iccid, aStkcommand);
 
     icc._deliverListenerEvent("notifyStkCommand", [aStkcommand]);
   },
 
   notifyStkSessionEnd: function(aServiceId) {
     if (DEBUG) {
       debug("notifyStkSessionEnd for service Id: " + aServiceId);