[B2G][SMS] Enable DEBUG Flag in SmsService if the default value of "ril.debugging.enabled" is true.

RESOLVED FIXED in Firefox 39

Status

defect
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: bevis, Assigned: freesamael)

Tracking

unspecified
2.2 S7 (6mar)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(tracking-b2g:backlog, firefox39 fixed)

Details

(Whiteboard: [good first bug])

Attachments

(1 attachment, 1 obsolete attachment)

Similar to MmsService, we should enable the DEBUG flag in SmsService.js if the default value of "ril.debugging.enabled" is set to true.

After running the script of enable_debug_flags.sh in 
https://github.com/bevis-tseng/Debug_Tools
we shall be able to see the debug message in SmsService.js when sending/receiving SMS.
Hi Samael,

Would you like to take this bug to warm up? :)
Flags: needinfo?(sawang)
Whiteboard: [good first bug]
Assignee: nobody → sawang
Flags: needinfo?(sawang)
Posted patch bug-1132774-fix.patch (obsolete) — Splinter Review
Attachment #8569026 - Flags: review?(btseng)
Comment on attachment 8569026 [details] [diff] [review]
bug-1132774-fix.patch

Review of attachment 8569026 [details] [diff] [review]:
-----------------------------------------------------------------

Please see my suggestion inline.

Thanks!

::: dom/mobilemessage/gonk/SmsService.js
@@ +100,5 @@
> +try {
> +  let debugPref = Services.prefs.getBoolPref(kPrefRilDebuggingEnabled);
> +  DEBUG = DEBUG || debugPref;
> +} catch (e) {}
> +

Similar logic is available in SmsService._updateDebugFlag().
I suggest to reuse this in the constructor of SmsService instead.

BTW, please revise the following line in _updateDebugFlag()
      DEBUG = RIL.DEBUG_RIL ||
              Services.prefs.getBoolPref(kPrefRilDebuggingEnabled);
to 
      DEBUG = DEBUG ||
              Services.prefs.getBoolPref(kPrefRilDebuggingEnabled);
because DEBUG has already been initialized with RIL.DEBUG_RIL at declaration.

@@ +105,1 @@
>  function SmsService() {

this._updateDebugFlag();
Attachment #8569026 - Flags: review?(btseng)
Attachment #8569026 - Attachment is obsolete: true
Attachment #8571170 - Flags: review?(btseng)
Comment on attachment 8571170 [details] [diff] [review]
[B2G][SMS] Enable DEBUG Flag in SmsService if the default value of "ril.debugging.enabled" is true. r=btseng

Review of attachment 8571170 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me. 

Please set r=me in the patch description and 
add "checkin-needed" in the field of |keywords| after you got positive result from try server.

Thanks!
Attachment #8571170 - Flags: review?(btseng) → review+
blocking-b2g: --- → backlog
Attachment #8571170 - Attachment description: [B2G][SMS] Enable DEBUG Flag in SmsService if the default value of "ril.debugging.enabled" is true → [B2G][SMS] Enable DEBUG Flag in SmsService if the default value of "ril.debugging.enabled" is true. r=btseng
https://hg.mozilla.org/mozilla-central/rev/95443c5c35fd
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S7 (6mar)
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.