B2G MMS: Notify user while retrieving expiried notification indication.

RESOLVED FIXED in Firefox 23

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: ctai, Assigned: ctai)

Tracking

unspecified
mozilla23
ARM
Gonk (Firefox OS)
Points:
---
Dependency tree / graph
Bug Flags:
in-moztrap -

Firefox Tracking Flags

(blocking-b2g:leo+, firefox21 wontfix, firefox22 wontfix, firefox23 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix)

Details

Attachments

(1 attachment, 4 obsolete attachments)

No description provided.
Assignee: nobody → ctai
When download option set to manual, the end user might retrieve an expiried notification. We should deal with this situation.
In OMA-TS-MMS_ENC-V1_3-20110913-A, tbale 3 Header fields of M-Notification.ind PDU in chapter 6.2 mentions that X-Mms-Expiry is mandatory field.It is the length of time the message will be available. The field has only one format, relative.
Depends on: 843445
Posted patch Patch v1.0 (obsolete) — Splinter Review
Posted patch Patch v1.1 (obsolete) — Splinter Review
Fix typo.
Attachment #732643 - Attachment is obsolete: true
Posted patch Patch v1.2 (obsolete) — Splinter Review
Another typo.
Attachment #732645 - Attachment is obsolete: true
Attachment #732646 - Flags: feedback?(vyang)
Comment on attachment 732646 [details] [diff] [review]
Patch v1.2

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

::: dom/mms/src/ril/MmsService.js
@@ +1050,5 @@
>      // For X-Mms-Report-Allowed
>      let wish = notification.headers["x-mms-delivery-report"];
> +    // The x-mms-expiry is mandatory and relative time in notification indication.
> +    let expiryTime = notification.headers["x-mms-expiry"] * 1000;
> +    notification.expiryDate = Date.now() + expiryTime;

Please don't actively assign any header values as direct attributes of the message object.

@@ +1353,5 @@
> +            aRequest.notifyDeleteMessageFailed(aRv);
> +          }
> +        };
> +        gMobileMessageDatabaseService
> +          .deleteMessageRecordById(aMessageRecord.id, notifyCallback);

Please don't actively delete a message. That's user's decision. Return an error instead.

::: dom/mobilemessage/interfaces/nsIRilMobileMessageDatabaseService.idl
@@ +88,5 @@
> +   * |aCallback| nsIRilMobileMessageDatabaseCallback: a callback for notifying
> +   *   the deletion result.
> +   */
> +  void deleteMessageRecordById(in long aMessageId,
> +                               in nsIRilMobileMessageDatabaseCallback aCallback);

You don't need this.

::: dom/mobilemessage/src/ril/MobileMessageDatabaseService.js
@@ +1385,5 @@
>      });
>    },
>  
> +  deleteMessageRecordById: function deleteMessageRecordById(aMessageId, aCallback) {
> +    if (DEBUG) debug("Deleting message with ID " + aMessageId);

ditto.
Attachment #732646 - Flags: feedback?(vyang) → feedback-
Posted patch Patch v1.3 (obsolete) — Splinter Review
Modified accroding to comment 6.
Attachment #732646 - Attachment is obsolete: true
Attachment #734495 - Flags: review?(vyang)
Comment on attachment 734495 [details] [diff] [review]
Patch v1.3

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

::: dom/mms/src/ril/MmsService.js
@@ +1338,5 @@
>          debug("Can't find mms content url in database.");
>          aRequest.notifyGetMessageFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
>          return;
>        }
> +      // The x-mms-expiry is mandatory and relative time in notification indication.

nit: new line. Please cite MMS-ENC 6.2 "Multimedia Message Notification" directly:

  The field has only one format, relative. The recipient client calculates this
  length of time relative to the time it receives the notification.
Attachment #734495 - Flags: review?(vyang) → review+
Posted patch Patch v1.4Splinter Review
Add new line and modify the comment.
Attachment #734495 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/ea61e47d09ca
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
See chapter 6.2 in OMA-TS-MMS-CTR-V1_3-20110511-C.
blocking-b2g: --- → leo?
blocking-b2g: leo? → leo+
Whiteboard: [NO_UPLIFT]
Flags: in-moztrap-
You need to log in before you can comment on or make changes to this bug.