Bug 797972 - False roaming situation. r=vicamo
authorYoshi Huang <allstars.chh@mozilla.com>
Thu, 04 Oct 2012 19:30:06 -0300
changeset 110809 1602ef5c86e210a999422102f015bb1a6988198e
parent 110808 875701feacbd7cae42214aede50641f7a420ba3f
child 110810 4430d306f3f7a936a5e8a6fec4e3c2e3c459eb94
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersvicamo
bugs797972
milestone19.0a1
Bug 797972 - False roaming situation. r=vicamo
dom/system/gonk/RadioInterfaceLayer.js
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -616,20 +616,20 @@ RadioInterfaceLayer.prototype = {
     *                      roaming state will be changed (maybe, if needed).
     */
   checkRoamingBetweenOperators: function checkRoamingBetweenOperators(registration) {
     let icc = this.rilContext.icc;
     if (!icc || !registration.connected) {
       return;
     }
 
-    let spn = icc.spn;
+    let spn = icc.spn && icc.spn.toLowerCase();
     let operator = registration.network;
-    let longName = operator.longName;
-    let shortName = operator.shortName;
+    let longName = operator.longName && operator.longName.toLowerCase();
+    let shortName = operator.shortName && operator.shortName.toLowerCase();
 
     let equalsLongName = longName && (spn == longName);
     let equalsShortName = shortName && (spn == shortName);
     let equalsMcc = icc.mcc == operator.mcc;
 
     registration.roaming = registration.roaming &&
                            !(equalsMcc && (equalsLongName || equalsShortName));
   },