Closed Bug 868120 Opened 13 years ago Closed 13 years ago

B2G MMS: Add 'mms.debugging.enabled' pref for MMS debug messages to make sure whether message is sent by SMS or MMS.

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23
blocking-b2g leo+
Tracking Status
firefox21 --- wontfix
firefox22 --- wontfix
firefox23 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix

People

(Reporter: pyang, Assigned: ctai)

Details

Attachments

(1 file, 5 obsolete files)

It is a required feature. For testing MMS, QA need a way to know whether a message is sent by SMS or MMS. [:ctai] suggests to use debug log for this issue. As https://bugzilla.mozilla.org/show_bug.cgi?id=811605 mentioned, log level can be raised by implementing an option in gecko and modify user.js to enable it. Please help to solve by above or some other approaches, thanks.
Hi, please help to work on this issue, thanks.
blocking-b2g: --- → leo?
Flags: needinfo?(ctai)
(In reply to Paul Yang from comment #0) > It is a required feature. Sorry, It is a feature request^ > For testing MMS, QA need a way to know whether a message is sent by SMS or > MMS. [:ctai] suggests to use debug log for this issue. > As https://bugzilla.mozilla.org/show_bug.cgi?id=811605 mentioned, log level > can be raised by implementing an option in gecko and modify user.js to > enable it. Please help to solve by above or some other approaches, thanks.
Assignee: nobody → ctai
Flags: needinfo?(ctai)
Attached patch Patch v1.0 (obsolete) — Splinter Review
Attached patch Patch v1.1 (obsolete) — Splinter Review
Attachment #744858 - Attachment is obsolete: true
Attachment #744860 - Flags: feedback?(vyang)
leo+ because QA needs this. Tempted to make this NPOTB, but it does require code change.
blocking-b2g: leo? → leo+
Comment on attachment 744860 [details] [diff] [review] Patch v1.1 Review of attachment 744860 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/mms/src/ril/MmsService.js @@ +20,5 @@ > + > +// Read debug setting from pref > +let debugPref = false; > +try { > + debugPref = Services.prefs.getBoolPref("mms.debugging.enabled"); You'll also need an entry in `modules/libpref/src/init/all.js` @@ +1379,5 @@ > null, > aIsSentSuccess ? DELIVERY_SENT : DELIVERY_ERROR, > aIsSentSuccess ? null : DELIVERY_STATUS_ERROR, > function notifySetDeliveryResult(aRv, aDomMessage) { > debug("Marking the delivery state/staus is done. Notify sent or failed."); nit: since you're here, please also guard all debug messages with DEBUG flag.
Attachment #744860 - Flags: feedback?(vyang) → feedback+
Component: Gaia::SMS → DOM: Device Interfaces
Product: Boot2Gecko → Core
Summary: [MMS] Need identifier to make sure whether message is sent by SMS or MMS → B2G MMS: Need identifier to make sure whether message is sent by SMS or MMS
Comment on attachment 744860 [details] [diff] [review] Patch v1.1 Review of attachment 744860 [details] [diff] [review]: ----------------------------------------------------------------- A drive-by review. ::: dom/mms/src/ril/MmsService.js @@ +15,5 @@ > > const RIL_MMSSERVICE_CONTRACTID = "@mozilla.org/mms/rilmmsservice;1"; > const RIL_MMSSERVICE_CID = Components.ID("{217ddd76-75db-4210-955d-8806cd8d87f9}"); > > +var DEBUG = false; nit: s/var/let. @@ +17,5 @@ > const RIL_MMSSERVICE_CID = Components.ID("{217ddd76-75db-4210-955d-8806cd8d87f9}"); > > +var DEBUG = false; > + > +// Read debug setting from pref nit: all the comment should follow the format: //{a_white_space}{upper_case_letter}...{a_period} so: // Read debug setting from pref. @@ +18,5 @@ > > +var DEBUG = false; > + > +// Read debug setting from pref > +let debugPref = false; why not just using: let DEBUG = false; so that you don't need an extra |debugPref|.
(In reply to Gene Lian [:gene] from comment #7) > Comment on attachment 744860 [details] [diff] [review] > Patch v1.1 > > Review of attachment 744860 [details] [diff] [review]: > ----------------------------------------------------------------- > > A drive-by review. > > ::: dom/mms/src/ril/MmsService.js > @@ +15,5 @@ > > > > const RIL_MMSSERVICE_CONTRACTID = "@mozilla.org/mms/rilmmsservice;1"; > > const RIL_MMSSERVICE_CID = Components.ID("{217ddd76-75db-4210-955d-8806cd8d87f9}"); > > > > +var DEBUG = false; > > nit: s/var/let. > > @@ +17,5 @@ > > const RIL_MMSSERVICE_CID = Components.ID("{217ddd76-75db-4210-955d-8806cd8d87f9}"); > > > > +var DEBUG = false; > > + > > +// Read debug setting from pref > > nit: all the comment should follow the format: > > //{a_white_space}{upper_case_letter}...{a_period} > > so: > > // Read debug setting from pref. > > @@ +18,5 @@ > > > > +var DEBUG = false; > > + > > +// Read debug setting from pref > > +let debugPref = false; > > why not just using: > > let DEBUG = false; > > so that you don't need an extra |debugPref|. debugPref comes from getBoolPref. And it might be fail to get.
Attached patch Patch v1.2 (obsolete) — Splinter Review
Attachment #744860 - Attachment is obsolete: true
Attached patch Patch v1.3 (obsolete) — Splinter Review
Attachment #745384 - Attachment is obsolete: true
Attached patch Patch v1.4 (obsolete) — Splinter Review
Attachment #745388 - Attachment is obsolete: true
Attachment #745391 - Flags: review?(vyang)
To enable mms debug log, you need to add one line, 'pref("mms.debugging.enabled", true);', into /system/b2g/defaults/pref/user.js in device. Then reboot device or restart b2g service. detailed step: adb remount adb pull /system/b2g/defaults/pref/user.js user.js [update user.js with adding 'pref("mms.debugging.enabled", true);'] adb push user.js /system/b2g/defaults/pref/user.js adb shell reboot
Comment on attachment 745391 [details] [diff] [review] Patch v1.4 Review of attachment 745391 [details] [diff] [review]: ----------------------------------------------------------------- Can't really tell what's the relationship between the commit summary and the patch body. Could you re-title it to some thing like "add 'mms.debugging.enabled' pref for MMS debug messages"?
Attachment #745391 - Flags: review?(vyang) → review+
Summary: B2G MMS: Need identifier to make sure whether message is sent by SMS or MMS → B2G MMS: Add 'mms.debugging.enabled' pref for MMS debug messages to make sure whether message is sent by SMS or MMS.
Attached patch Patch v1.5Splinter Review
Attachment #745391 - Attachment is obsolete: true
Comment on attachment 745925 [details] [diff] [review] Patch v1.5 Re-titled
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Flags: in-moztrap-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: