Bug 843452 - Part 4-3: [MMS] Get voiceInfo via MobileConnectionService. r=vicamo
☠☠ backed out by de824c1ec349 ☠ ☠
authorEdgar Chen <echen@mozilla.com>
Tue, 01 Jul 2014 18:47:29 +0800
changeset 224038 b95ff097374d706aa9abc08944865265ea6f1441
parent 224037 8d6428a93500bef32e830827a669da24de805137
child 224039 9a94ea71d232a52ef12d25730edba42365b75448
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvicamo
bugs843452
milestone34.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 843452 - Part 4-3: [MMS] Get voiceInfo via MobileConnectionService. r=vicamo
dom/mobilemessage/src/gonk/MmsService.js
--- a/dom/mobilemessage/src/gonk/MmsService.js
+++ b/dom/mobilemessage/src/gonk/MmsService.js
@@ -158,16 +158,20 @@ XPCOMUtils.defineLazyServiceGetter(this,
 XPCOMUtils.defineLazyServiceGetter(this, "gRil",
                                    "@mozilla.org/ril;1",
                                    "nsIRadioInterfaceLayer");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gNetworkManager",
                                    "@mozilla.org/network/manager;1",
                                    "nsINetworkManager");
 
+XPCOMUtils.defineLazyServiceGetter(this, "gMobileConnectionService",
+                                   "@mozilla.org/mobileconnection/mobileconnectionservice;1",
+                                   "nsIMobileConnectionService");
+
 XPCOMUtils.defineLazyGetter(this, "MMS", function() {
   let MMS = {};
   Cu.import("resource://gre/modules/MmsPduHelper.jsm", MMS);
   return MMS;
 });
 
 // Internal Utilities
 
@@ -319,17 +323,18 @@ MmsConnection.prototype = {
   },
 
   /**
    * Return the roaming status of voice call.
    *
    * @return true if voice call is roaming.
    */
   isVoiceRoaming: function() {
-    let isRoaming = this.radioInterface.rilContext.voice.roaming;
+    let voice = gMobileConnectionService.getVoiceConnectionInfo(this.serviceId);
+    let isRoaming = voice.roaming;
     if (DEBUG) debug("isVoiceRoaming = " + isRoaming);
     return isRoaming;
   },
 
   /**
    * Get phone number from iccInfo.
    *
    * If the icc card is gsm card, the phone number is in msisdn.