Closed Bug 844429 Opened 11 years ago Closed 11 years ago

B2G SMS & MMS: move SMS codes into dom/mobilemessage to make it generic for MMS

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

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

People

(Reporter: airpingu, Assigned: airpingu)

References

Details

Attachments

(2 files, 4 obsolete files)

As title. After discussing with Vicamo, we're hoping to move the SMS codes into dom/mobilemessage to make it more generic for MMS. This is a precondition to implement the MMS DOM API in the future.
Blocks: 844431
Attached patch Patch (obsolete) — Splinter Review
Seems working well. Please take this review.

Run the try at the same time: https://tbpl.mozilla.org/?tree=Try&rev=fd6b1506bafa
Attachment #717781 - Flags: review?(vyang)
Comment on attachment 717781 [details] [diff] [review]
Patch

Hi Mounir,

Just a quick question needing your feedback. In this bug, we need to deprecate the |dom_sms.xpt| in:

  b2g/installer/package-manifest.in
  browser/installer/package-manifest.in
  mobile/android/installer/package-manifest.in
  mobile/xul/installer/package-manifest.in

We're wondering do we need to add the corresponding codes to indicate the |dom_sms.xpt| has been removed?

  b2g/installer/removed-files.in
  browser/installer/removed-files.in
  mobile/android/installer/removed-files.in
  mobile/xul/installer/removed-files.in

If yes, could you please give us a quick example for how to do so? Thanks!
Attachment #717781 - Flags: feedback?(mounir)
leo+, this bug is needed to fulfill MMS user stories for v1.1
blocking-b2g: --- → leo+
Comment on attachment 717781 [details] [diff] [review]
Patch

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

::: dom/base/Navigator.cpp
@@ +68,5 @@
>  
>  #include "nsIDOMGlobalPropertyInitializer.h"
>  
>  using namespace mozilla::dom::power;
> +using namespace mozilla::dom::mobilemessage;

If we had to change this line, maybe just move all dom-related code to mozilla::dom instead and keep ipc-related in mozilla::dom::mobilemessage.

::: dom/dom-config.mk
@@ +12,5 @@
>    dom/media \
>    dom/network/src \
>    dom/settings \
>    dom/phonenumberutils \
> +  dom/mobilemessage/src \

Please don't add such entry to dom-config. We don't really need it. Just export necessary header files instead.
Attachment #717781 - Flags: review?(vyang)
Attached patch Patch, V2 (obsolete) — Splinter Review
Hi Mounir,

Could you please double check the |removed-files.in| parts (please see the comment #2 for the purpose)? Thanks!

Hi Vicamo,

This new patch addresses comment #4. Please feel free to let me know if you think it's better to put *internal* services/types/constants under |mozilla::dom| as well (instead of |mozilla::dom::mobilemessage|). Btw, we have to add |dom/mobilemessage/src| to dom-config.mk; otherwise, we would see compiling errors. Thanks for your review again!

See the try at the same time: https://tbpl.mozilla.org/?tree=Try&rev=05e00fb01cd8
Attachment #717781 - Attachment is obsolete: true
Attachment #717781 - Flags: feedback?(mounir)
Attachment #718922 - Flags: review?(vyang)
Attachment #718922 - Flags: feedback?(mounir)
> See the try at the same time:
> https://tbpl.mozilla.org/?tree=Try&rev=05e00fb01cd8

Oops, some compiling errors in Android but seems easy to fix. Please go ahead to review. Thanks!
Comment on attachment 718922 [details] [diff] [review]
Patch, V2

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

Great work! Thank you :)

::: dom/dom-config.mk
@@ +12,5 @@
>    dom/media \
>    dom/network/src \
>    dom/settings \
>    dom/phonenumberutils \
> +  dom/mobilemessage/src \

Can't we just remove dom/sms/src from the list?
Attachment #718922 - Flags: review?(vyang) → review+
Attached patch Patch, V3 (obsolete) — Splinter Review
Addressing comment #7 and rebasing everything. r=vicamo

Run the try at the same time: https://tbpl.mozilla.org/?tree=Try&rev=68dce758e3f0
Attachment #718922 - Attachment is obsolete: true
Attachment #718922 - Flags: feedback?(mounir)
Attachment #719839 - Flags: review+
It might be difficult to check this in into b2g18 due to lots of conflicts with the recent makefile change.
https://hg.mozilla.org/mozilla-central/rev/af40e0f0ce26
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
So this has been pushed without a DOM peer review?
Depends on: 847187
(In reply to Mounir Lamouri (:mounir) from comment #13)
> So this has been pushed without a DOM peer review?

Ah, I apologize for this careless mistake. We don't really mean it :(
Blocks: 847736
Blocks: 847738
Blocks: 847744
Blocks: 847756
Blocks: 847760
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #14)
> (In reply to Mounir Lamouri (:mounir) from comment #13)
> > So this has been pushed without a DOM peer review?
> 
> Ah, I apologize for this careless mistake. We don't really mean it :(

Sorry! Mounir! We are not aware of that because it didn't touch any public DOM API changes. So... it seems we also need to ask for a DOM-peer review for the directory changes regarding the DOM API codes. We'll watch out next time. Sorry again!
This is going to need a branch-specific patch for uplift.
(In reply to Ryan VanderMeulen [:RyanVM] from comment #16)
> This is going to need a branch-specific patch for uplift.

We'll take care of it.
Attached patch [b2g18] (obsolete) — Splinter Review
Verified locally. Will push after last tbpl commit turns (nearly) all green.
Attached patch [b2g18]Splinter Review
Re-gen with hg. Landing ...
Attachment #724079 - Attachment is obsolete: true
Added [NO_UPLIFT][RIL_INTERFACE] per recent commercial RIL compatibility issue. Waiting on further decision to keep the patch in b2g18 or to back it out.

------------------------------
If we really want to back them out, backing the following MMS bugs should be enough to make the commercial RIL compatible:

Bug 854422 - B2G MMS: should call .NotifyResponseTransaction() with MMS_PDU_STATUS_RETRIEVED after an MMS is retrieved under the RETRIEVAL_MODE_AUTOMATIC mode (a follow-up for bug 845643)
Bug 850680 - B2G MMS: broadcast "sms-received" and "sms-sent" system messages
Bug 850530 - B2G MMS: Use the same attribute name for delivery (s/state/delivery) like SMS
Bug 852911 - B2G MMS: fail to expose correct nsIDOMMozMmsMessage.attachments.
Bug 853725 - B2G MMS: fail to read nsIDOMMozMmsMessage.receivers for a received MMS (a follow-up of bug 849741).
Bug 853329 - B2G MMS: other Android phones cannot read attachments sent from FFOS
Bug 852471 - B2G MMS: provide nsIDOMMobileMessageManager interface (with sendMMS() first) (follow-up fix)
Bug 852460 - B2G MMS: provide nsIDOMMobileMessageManager.onreceived event (follow-up fix)
Bug 849741 - B2G MMS: provide nsIDOMMobileMessageManager.onreceived event
Bug 847756 - B2G MMS: provide nsIDOMMobileMessageManager.markMessageRead().
Bug 847736 - B2G MMS: provide nsIDOMMobileMessageManager.delete().
Bug 847738 - B2G MMS: provide nsIDOMMobileMessageManager.getMessage(). 
Bug 844431 - B2G MMS: provide nsIDOMMobileMessageManager interface (with sendMMS() first)
Bug 845643 - B2G MMS: Save retrieved MMS into database.
Bug 792321 - Check max values of MMS parameters in sendRequest.
Bug 833291 - B2G SMS & MMS: getMessages it's not working with PhoneNumberJS
Bug 844429 - B2G SMS & MMS: move SMS codes into dom/mobilemessage to make it generic for MMS
Bug 839436 - B2G MMS: make DB be able to save MMS messages.
Whiteboard: [NO_UPLIFT]
Confirming with Michael to see we should back out to Bug 839436 or just Bug 844431 (if we eventually decide to back out). Please see Bug 857632, comment #17.
Lets keep it in please, no need to churn more.
Whiteboard: [NO_UPLIFT]
Flags: in-moztrap-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: