Closed Bug 1132774 Opened 9 years ago Closed 9 years ago

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

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog, firefox39 fixed)

RESOLVED FIXED
2.2 S7 (6mar)
tracking-b2g backlog
Tracking Status
firefox39 --- fixed

People

(Reporter: bevis, Assigned: freesamael)

Details

(Whiteboard: [good first bug])

Attachments

(1 file, 1 obsolete file)

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)
Attached 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: 9 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.

Attachment

General

Created:
Updated:
Size: