Bug 1132774 - [B2G][SMS] Enable DEBUG Flag in SmsService if the default value of "ril.debugging.enabled" is true. r=btseng
authorSamael Wang <sawang@mozilla.com>
Mon, 02 Mar 2015 14:06:40 +0800
changeset 231813 95443c5c35fd3513fadc74d6a2b8a19f3dbdb279
parent 231812 c762eb64f32f5d3b3786f968e7c475915a39c3e6
child 231814 67812860b99757c686edb604387229d9ed301b1c
push id28360
push userryanvm@gmail.com
push dateWed, 04 Mar 2015 20:58:22 +0000
treeherdermozilla-central@04653ab2dcb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbtseng
bugs1132774
milestone39.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 1132774 - [B2G][SMS] Enable DEBUG Flag in SmsService if the default value of "ril.debugging.enabled" is true. r=btseng
dom/mobilemessage/gonk/SmsService.js
--- a/dom/mobilemessage/gonk/SmsService.js
+++ b/dom/mobilemessage/gonk/SmsService.js
@@ -95,16 +95,17 @@ XPCOMUtils.defineLazyServiceGetter(this,
                                    "nsISmsMessenger");
 
 let DEBUG = RIL.DEBUG_RIL;
 function debug(s) {
   dump("SmsService: " + s);
 }
 
 function SmsService() {
+  this._updateDebugFlag();
   this._silentNumbers = [];
   this.smsDefaultServiceId = this._getDefaultServiceId();
 
   this._portAddressedSmsApps = {};
   this._portAddressedSmsApps[gWAP.WDP_PORT_PUSH] = this._handleSmsWdpPortPush.bind(this);
 
   this._receivedSmsSegmentsMap = {};
 
@@ -124,17 +125,17 @@ SmsService.prototype = {
                                     flags: Ci.nsIClassInfo.SINGLETON}),
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsISmsService,
                                          Ci.nsIGonkSmsService,
                                          Ci.nsIObserver]),
 
   _updateDebugFlag: function() {
     try {
-      DEBUG = RIL.DEBUG_RIL ||
+      DEBUG = DEBUG ||
               Services.prefs.getBoolPref(kPrefRilDebuggingEnabled);
     } catch (e) {}
   },
 
   _getDefaultServiceId: function() {
     let id = Services.prefs.getIntPref(kPrefDefaultServiceId);
     let numRil = Services.prefs.getIntPref(kPrefRilNumRadioInterfaces);