Closed
Bug 921918
Opened 11 years ago
Closed 11 years ago
B2G MMS: When receiving a read report, notify Gaia SMS AP which receiver has read the MMS.
Categories
(Firefox OS Graveyard :: RIL, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.3 Sprint 6 - 12/6
People
(Reporter: ctai, Assigned: vicamo)
References
Details
(Keywords: dev-doc-needed)
Attachments
(13 files, 23 obsolete files)
1.46 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
5.72 KB,
patch
|
airpingu
:
review+
|
Details | Diff | Splinter Review |
8.73 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
1.35 KB,
patch
|
airpingu
:
review+
|
Details | Diff | Splinter Review |
3.10 KB,
patch
|
airpingu
:
review+
|
Details | Diff | Splinter Review |
22.01 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
8.82 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
6.42 KB,
patch
|
airpingu
:
review+
|
Details | Diff | Splinter Review |
3.92 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
21.68 KB,
patch
|
airpingu
:
review+
|
Details | Diff | Splinter Review |
12.76 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
5.89 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
564 bytes,
patch
|
Details | Diff | Splinter Review |
As a sender, FFOS is capable of displaying the read status to specify if the receiver has read the MMS.
Updated•11 years ago
|
Assignee: nobody → gene.lian
Updated•11 years ago
|
Summary: B2G MMS: When receiving a read report, notify Gaia SMS AP which receiver return the read report. → B2G MMS: When receiving a read report, notify Gaia SMS AP which receiver has read the MMS.
Updated•11 years ago
|
blocking-b2g: --- → 1.3?
Comment 1•11 years ago
|
||
My plate is too full. Assign this to Ctai who is available working on this. Thank you very much!
Assignee: gene.lian → ctai
Updated•11 years ago
|
Keywords: dev-doc-needed
Reporter | ||
Comment 2•11 years ago
|
||
IDL part
Reporter | ||
Updated•11 years ago
|
Attachment #828424 -
Flags: review?(gene.lian)
Reporter | ||
Comment 3•11 years ago
|
||
1. Add new observer topic for read status change.
2. Change DOM message related code for read status and read timestamp.
3. Add |setMessageReadReportByEnvelopeId| into MobileMessageDatabaseService.js.
4. Handle incoming M-Read-Orig.ind in MmsService.js.
Reporter | ||
Comment 4•11 years ago
|
||
1. Add new observer topic for read status change.
2. Change DOM message related code for read status and read timestamp.
3. Add |setMessageReadReportByEnvelopeId| into MobileMessageDatabaseService.js.
4. Handle incoming M-Read-Orig.ind in MmsService.js.
5. Fix trailing white space.
Attachment #828427 -
Attachment is obsolete: true
Reporter | ||
Updated•11 years ago
|
Attachment #828430 -
Flags: review?
Attachment #828430 -
Flags: feedback?(vyang)
Comment 5•11 years ago
|
||
Comment on attachment 828424 [details] [diff] [review]
bug-921918-1.patch part1 idl v1.0
Review of attachment 828424 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/mobilemessage/interfaces/nsIDOMMozMmsMessage.idl
@@ +20,5 @@
> DOMString? receiver;
> DOMString? deliveryStatus;
> + DOMString? readStatus;
> + jsval readTimestamp; // Date object. null if not available (e.g.,
> + // |delivery| = "received" or not yet delivered).
s/delivered/read/
::: dom/mobilemessage/interfaces/nsIRilMobileMessageDatabaseService.idl
@@ +102,5 @@
> + * |aReceiver| DOMString: the phone number of receiver (for MMS; can be null).
> + * |aReadStatus| DOMString: the new read status to update.
> + * |aCallback| nsIRilMobileMessageDatabaseCallback: an optional callback.
> + */
> + void setMessageReadReportByEnvelopeId(in DOMString aEnvelopeId,
I'd prefer using the original setMessageDeliveryByEnvelopeId(...) and add an extra parameter |aReadStatus| so that we can share most of the existing logic. What do you think?
Attachment #828424 -
Flags: review?(gene.lian)
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Gene Lian [:gene] (needinfo? encouraged) from comment #5)
> Review of attachment 828424 [details] [diff] [review]:
> -----------------------------------------------------------------
> ::: dom/mobilemessage/interfaces/nsIRilMobileMessageDatabaseService.idl
> @@ +102,5 @@
> > + * |aReceiver| DOMString: the phone number of receiver (for MMS; can be null).
> > + * |aReadStatus| DOMString: the new read status to update.
> > + * |aCallback| nsIRilMobileMessageDatabaseCallback: an optional callback.
> > + */
> > + void setMessageReadReportByEnvelopeId(in DOMString aEnvelopeId,
>
> I'd prefer using the original setMessageDeliveryByEnvelopeId(...) and add an
> extra parameter |aReadStatus| so that we can share most of the existing
> logic. What do you think?
No, just don't want to bloat a function with numerous parameters and complex logic. Extract common part of |setMessageDeliveryByEnvelopeId| into another utility function and let the core function be crystal clear and self-evident.
Assignee | ||
Updated•11 years ago
|
Attachment #828424 -
Flags: review+
Reporter | ||
Updated•11 years ago
|
Attachment #828430 -
Flags: review?
Reporter | ||
Comment 8•11 years ago
|
||
1. Change the comment for readTimestamp
2. Change |setMessageReadReportByEnvelopeId| to |setMessageReadStatusByEnvelopeId|
Attachment #828424 -
Attachment is obsolete: true
Reporter | ||
Updated•11 years ago
|
Attachment #829022 -
Flags: review?(gene.lian)
Reporter | ||
Comment 9•11 years ago
|
||
1. Add new common function |findReceiverFromDeliveryInfo| for |updateMessageDeliveryById| and |setMessageReadStatusByEnvelopeId|.
Attachment #828430 -
Attachment is obsolete: true
Attachment #828430 -
Flags: feedback?(vyang)
Reporter | ||
Updated•11 years ago
|
Attachment #829023 -
Flags: review?(vyang)
Assignee | ||
Comment 10•11 years ago
|
||
Comment on attachment 829023 [details] [diff] [review]
bug-921918-2.patch part2, implementation v1.2
Review of attachment 829023 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/mobilemessage/src/MmsMessage.cpp
@@ +585,5 @@
> +
> + // Get |info.readTimestamp|.
> + if (!JS_DefineProperty(aCx, infoJsObj,
> + "readTimestamp", info.readTimestamp,
> + NULL, NULL, JSPROP_ENUMERATE)) {
if (!JS_DefineProperty(aCx, infoJsObj, "readTimestamp", info.readTimestamp,
NULL, NULL, JSPROP_ENUMERATE)) {
::: dom/mobilemessage/src/gonk/MmsService.js
@@ +1903,5 @@
> + address,
> + readStatus,
> + (function notifySetReadResult(aRv, aDomMessage) {
> + if (DEBUG) debug("Marking the read status is done.");
> + // TODO bug 832140 handle !Components.isSuccessCode(aRv)
Please still have check for aRv and return from the callback if aRv != Cr.NS_OK.
::: dom/mobilemessage/src/gonk/MobileMessageDatabaseService.js
@@ +21,5 @@
>
> const DEBUG = false;
> const DISABLE_MMS_GROUPING_FOR_RECEIVING = true;
>
> +XPCOMUtils.defineLazyGetter(this, "MMSPdu", function () {
let's just have "MMS" because we have that in MmsService.
@@ +254,5 @@
> self.upgradeSchema17(event.target.transaction, next);
> break;
> case 18:
> + if (DEBUG) debug("Upgrade to version 19. Add readStatus and readTimestamp.");
> + self.upgradeSchema17(event.target.transaction, next);
nit: upgradeSchema18
@@ +2078,5 @@
> + getRequest.onsuccess = function onsuccess(event) {
> + messageRecord = event.target.result;
> + if (!messageRecord) {
> + if (DEBUG) debug("envelopeId = " + envelopeId + " is not found");
> + return;
This triggers a transaction oncomplete event with a undefined |messageRecord|, and then we will have an exception thrown in |self.createDomMessageFromRecord|.
@@ +2084,5 @@
> +
> + let isRecordUpdated = false;
> +
> + // Update |messageRecord.deliveryInfo[].readStatus| if needed.
> + if (!receiver) {
|receiver| must be defined here because M-Read-Orig.ind PDU forbids insert-address-token in the mandatory "from" header field.
::: dom/mobilemessage/src/gonk/mms_consts.js
@@ +97,5 @@
>
> +// X-Mms-Read-Status values
> +//@see OMA-TS-MMS_ENC-V1_3-20110913-A clause 7.3.38
> +this.MMS_READ_STATUS_READ = 128;
> +this.MMS_READ_STATUS_DELETED_WITHOUT_BEING_READ = 129;
Never referenced.
Attachment #829023 -
Flags: review?(vyang)
Comment 11•11 years ago
|
||
Comment on attachment 829022 [details] [diff] [review]
bug-921918-1.patch part1 idl v1.1
Review of attachment 829022 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/mobilemessage/interfaces/nsIDOMMozMmsMessage.idl
@@ +21,5 @@
> DOMString? deliveryStatus;
> jsval deliveryTimestamp; // Date object; null if not available (e.g.,
> // |delivery| = "received" or not yet delivered).
> + DOMString? readStatus;
> + jsval readTimestamp; // Date object. null if not available (e.g.,
Align |readTimestamp| to other attributes.
@@ +22,5 @@
> jsval deliveryTimestamp; // Date object; null if not available (e.g.,
> // |delivery| = "received" or not yet delivered).
> + DOMString? readStatus;
> + jsval readTimestamp; // Date object. null if not available (e.g.,
> + // |readStatus| = "not-applicable" or not yet read).
s/"not-applicable"/"received"/
since we're going to have more readStatus other than "success" (your original "read") and "not-applicable".
::: dom/mobilemessage/interfaces/nsIRilMobileMessageDatabaseService.idl
@@ +93,2 @@
> */
> void setMessageDeliveryByEnvelopeId(in DOMString aEnvelopeId,
Since you're changing IDL here, could you please rename this as well:
s/setMessageDeliveryByEnvelopeId/setMessageDeliveryStatusByEnvelopeId
and drop the |aDelivery| to make it more symmetric to |setMessageReadStatusByEnvelopeId|.
and make
1. The caller:
gMobileMessageDatabaseService
.setMessageDeliveryByEnvelopeId(envelopeId,
address,
deliveryStatus,
...)
2. The DB implementation:
setMessageDeliveryByEnvelopeId: function setMessageDeliveryByEnvelopeId(
envelopeId, receiver, deliveryStatus, callback) {
this.updateMessageDeliveryById(envelopeId, "envelopeId",
receiver, null, deliveryStatus,
null, callback);
},
What do you think?
@@ +99,5 @@
>
> /**
> + * |aEnvelopeId| DOMString: the "message-id" specified in the MMS PDU headers.
> + * |aReceiver| DOMString: the phone number of receiver (for MMS; can be null).
> + * |aReadStatus| DOMString: the new read status to update.
s/to update/to be updated/
Attachment #829022 -
Flags: review?(gene.lian)
Comment 12•11 years ago
|
||
Comment on attachment 829023 [details] [diff] [review]
bug-921918-2.patch part2, implementation v1.2
Btw, I don't see the logic for firing onreadsuccess/onreaderror events through IPC.
Comment 13•11 years ago
|
||
(In reply to Gene Lian [:gene] (needinfo? encouraged) from comment #11)
> 1. The caller:
>
> gMobileMessageDatabaseService
> .setMessageDeliveryByEnvelopeId(envelopeId,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
setMessageDeliveryStatusByEnvelopeId
> address,
> deliveryStatus,
> ...)
> 2. The DB implementation:
>
> setMessageDeliveryByEnvelopeId: function setMessageDeliveryByEnvelopeId(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
setMessageDeliveryStatusByEnvelopeId
> envelopeId, receiver, deliveryStatus, callback) {
> this.updateMessageDeliveryById(envelopeId, "envelopeId",
> receiver, null, deliveryStatus,
> null, callback);
>
> },
Reporter | ||
Comment 14•11 years ago
|
||
s/setMessageDeliveryByEnvelopeId/setMessageDeliveryStatusByEnvelopeId
Attachment #829022 -
Attachment is obsolete: true
Reporter | ||
Comment 15•11 years ago
|
||
Fix the wrong updateMessageDeliveryById.
Attachment #829023 -
Attachment is obsolete: true
Reporter | ||
Comment 16•11 years ago
|
||
Reporter | ||
Updated•11 years ago
|
Attachment #829178 -
Flags: review?(gene.lian)
Reporter | ||
Updated•11 years ago
|
Attachment #829180 -
Flags: review?(vyang)
Reporter | ||
Updated•11 years ago
|
Attachment #829181 -
Attachment description: bug-921918-3.patch implementation v1.0 → bug-921918-3.patch part3 implementation v1.0
Reporter | ||
Comment 17•11 years ago
|
||
Comment on attachment 829181 [details] [diff] [review]
bug-921918-3.patch part3 implementation v1.0
1. s/setMessageDeliveryByEnvelopeId/setMessageDeliveryStatusByEnvelopeId in MobileMessageDatabaseService.js
2. use |findReceiverFromDeliveryInfo| in |setMessageReadStatusByEnvelopeId|
3. Add ipc part.
4. In sending MMS, if we request read report, set readStatus to READ_STATUS_PENDING. Else set to READ_STATUS_NOT_APPLICABLE.
5. Following W3C spec, change to READ_STATUS_SUCCESS, READ_STATUS_PENDING, READ_STATUS_ERROR.
Reporter | ||
Updated•11 years ago
|
Attachment #829181 -
Flags: review?(vyang)
Comment 18•11 years ago
|
||
Comment on attachment 829178 [details] [diff] [review]
bug-921918-1.patch part1 idl v1.2
Review of attachment 829178 [details] [diff] [review]:
-----------------------------------------------------------------
Nice! r=gene (note that please don't use sr=gene).
Attachment #829178 -
Flags: review?(gene.lian) → review+
Assignee | ||
Comment 19•11 years ago
|
||
Taking this because Chia-Hung is on vocation. :)
Assignee: ctai → vyang
Component: DOM: Device Interfaces → RIL
Product: Core → Firefox OS
Reporter | ||
Comment 20•11 years ago
|
||
Vicamo, Thanks.
But it is bussiness trip....not vacation.
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #19)
> Taking this because Chia-Hung is on vocation. :)
Assignee | ||
Comment 21•11 years ago
|
||
Depends on bug 934931 because attachment 829180 [details] [diff] [review] (part 2) was moved into bug 934931.
Depends on: 934931
Assignee | ||
Comment 22•11 years ago
|
||
update commit summary only
Attachment #829178 -
Attachment is obsolete: true
Attachment #831564 -
Flags: review+
Assignee | ||
Comment 23•11 years ago
|
||
This patch was made from attachment 829181 [details] [diff] [review] by extracting lines other than backend changes.
Attachment #831566 -
Flags: review?(khuey)
Assignee | ||
Comment 24•11 years ago
|
||
I divide part 3 into four smaller pieces and will merge them before landing. In this part I'm going to refactor the dictionary structure used in |saveReceivedMessage|. The main purpose is to reduce the required fields, and to clarify what do we actually need.
In this piece, I only update the comment for the |iccId| field.
Assignee | ||
Comment 25•11 years ago
|
||
Move |sender| field assignment of a received MMS message into db to reduce duplicated code and to reduce a mandatory field in the passed dictionary object.
Attachment #831578 -
Flags: review?
Assignee | ||
Updated•11 years ago
|
Attachment #831572 -
Flags: review?(gene.lian)
Assignee | ||
Comment 26•11 years ago
|
||
Assign it in db because we can always have it from |message.headers["x-mms-transaction-id"]|.
Attachment #831580 -
Flags: review?(gene.lian)
Assignee | ||
Updated•11 years ago
|
Attachment #831578 -
Flags: review? → review?(gene.lian)
Assignee | ||
Comment 27•11 years ago
|
||
Passing |deliveryInfo| array causes some duplicated code. Besides we know that a received MMS message can have only one MmsDeliveryInfo entry and the |deliveryTimestamp| is always null (numeric zero), but the code doesn't reflect this well.
Attachment #831581 -
Flags: review?(gene.lian)
Assignee | ||
Comment 28•11 years ago
|
||
Attachment #829180 -
Attachment is obsolete: true
Attachment #829181 -
Attachment is obsolete: true
Attachment #829180 -
Flags: review?(vyang)
Attachment #829181 -
Flags: review?(vyang)
Comment 29•11 years ago
|
||
Comment on attachment 831572 [details] [diff] [review]
part 3.a/4: iccId is optional
Review of attachment 831572 [details] [diff] [review]:
-----------------------------------------------------------------
r=gene
Attachment #831572 -
Flags: review?(gene.lian) → review+
Attachment #831566 -
Flags: review?(khuey) → review+
Comment 30•11 years ago
|
||
Comment on attachment 831578 [details] [diff] [review]
part 3.b/4: assign received |aMmsMessage.sender| in mmdb
Review of attachment 831578 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/mobilemessage/src/gonk/MobileMessageDatabaseService.js
@@ +1849,5 @@
> }
> return;
> }
> +
> + let threadParticipants;
let threadParticipants = [aMessage.sender];
@@ +1858,5 @@
> + aMessage.sender = "anonymous";
> + }
> +
> + threadParticipants =
> + this.fillReceivedMmsThreadParticipants(aMessage, [aMessage.sender]);
This is not correct use of fillReceivedMmsThreadParticipants.
Should be:
this.fillReceivedMmsThreadParticipants(aMessage, threadParticipants);
@@ +1859,5 @@
> + }
> +
> + threadParticipants =
> + this.fillReceivedMmsThreadParticipants(aMessage, [aMessage.sender]);
> + } else { // SMS
Drop this else for SMS.
Attachment #831578 -
Flags: review?(gene.lian) → review-
Comment 31•11 years ago
|
||
Comment on attachment 831580 [details] [diff] [review]
part 3.c/4: don't pass transactionId
Review of attachment 831580 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/mobilemessage/src/gonk/MmsService.js
@@ +1596,5 @@
> mmsStatus,
> retrievedMessage) {
> if (DEBUG) debug("retrievedMessage = " + JSON.stringify(retrievedMessage));
>
> + let transactionId = savableMessage.headers["x-mms-transaction-id"];
...
Our NotifyResponseTransaction doesn't work because transactionId is null...
Thanks for catching this.
Attachment #831580 -
Flags: review?(gene.lian) → review+
Comment 32•11 years ago
|
||
Comment on attachment 831581 [details] [diff] [review]
part 3.d/4: construct mms deliveryInfo in db
Review of attachment 831581 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/mobilemessage/interfaces/nsIRilMobileMessageDatabaseService.idl
@@ -41,5 @@
> * - |sender| DOMString: the phone number of sender
> *
> * - If |type| == "mms", we also need:
> * - |delivery| DOMString: the delivery state of received message
> - * - |deliveryStatus| DOMString Array: the delivery status of received message
Hmm... we forgot update this when introducing |deliveryInfo|.
::: dom/mobilemessage/src/gonk/MmsService.js
@@ -2162,5 @@
> if (DEBUG) debug("Delivery of message record is not 'not-downloaded'.");
> aRequest.notifyGetMessageFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
> return;
> }
> - if (DELIVERY_STATUS_PENDING == aMessageRecord.deliveryStatus) {
Hmm... This was wrong. Sorry for not catching this review. Thanks!
::: dom/mobilemessage/src/gonk/MobileMessageDatabaseService.js
@@ +1905,5 @@
> aMessage.transactionIdIndex = aMessage.headers["x-mms-transaction-id"];
> aMessage.isReadReportSent = false;
>
> + // As a receiver, we don't need to care about the delivery status of
> + // others.
Please add one more sentence:
, so we put a single element with self's phone number in the |deliveryInfo| array.
Attachment #831581 -
Flags: review?(gene.lian) → review+
Assignee | ||
Comment 33•11 years ago
|
||
rebase only.
Attachment #831564 -
Attachment is obsolete: true
Attachment #8334712 -
Flags: review+
Assignee | ||
Comment 34•11 years ago
|
||
correct commit summary: r=khuey
Attachment #831566 -
Attachment is obsolete: true
Attachment #8334724 -
Flags: review+
Assignee | ||
Comment 35•11 years ago
|
||
1) rebase
2) update r=gene
Attachment #831572 -
Attachment is obsolete: true
Attachment #8334728 -
Flags: review+
Assignee | ||
Comment 36•11 years ago
|
||
rebase & address comment 30.
Attachment #831578 -
Attachment is obsolete: true
Attachment #8334732 -
Flags: review?(gene.lian)
Assignee | ||
Comment 37•11 years ago
|
||
rebase & update r=gene
Attachment #831580 -
Attachment is obsolete: true
Attachment #8334738 -
Flags: review+
Assignee | ||
Comment 38•11 years ago
|
||
rebase, add comment 32 and update r=gene
Attachment #831581 -
Attachment is obsolete: true
Attachment #8334741 -
Flags: review+
Assignee | ||
Comment 39•11 years ago
|
||
Attachment #8334743 -
Flags: review?(gene.lian)
Assignee | ||
Comment 40•11 years ago
|
||
This patch tries to share common behaviour that will also be used later in part 4.b/4. Also fixes an error that we try to create a DomMessage from an undefined messageRecord.
Attachment #8334748 -
Flags: review?(gene.lian)
Assignee | ||
Comment 41•11 years ago
|
||
Previous part 3.f/4 raises this issue up to table.
The second time we try to call |setMessageDeliveryByMessageId| with an undefined |aEnvelopeId|, |messageRecord.envelopeIdIndex| is actually assigned to string "undefined" because of xpconnnect. But since we set a UNIQUE flag on this index, trying to put this record into database raises a ConstrainedError.
Attachment #8334756 -
Flags: review?(gene.lian)
Assignee | ||
Comment 42•11 years ago
|
||
Attachment #8334758 -
Flags: review?(gene.lian)
Assignee | ||
Comment 43•11 years ago
|
||
Existing test cases passed, still to be verified on physical device. We can't have new test cases for this bug right now because of the lack of MMS test framework.
Attachment #831583 -
Attachment is obsolete: true
Assignee | ||
Comment 44•11 years ago
|
||
Verified with Unagi. Somehow our Gaia sends markMessageRead no more, I can only test M-Read-Orig.ind along with a Galaxy SII.
Full try: https://tbpl.mozilla.org/?tree=Try&rev=376165e7a73d
Attachment #8334761 -
Attachment is obsolete: true
Attachment #8335154 -
Flags: review?(gene.lian)
Comment 45•11 years ago
|
||
I'll try to take this review by the end of tomorrow.
Updated•11 years ago
|
Attachment #8334732 -
Flags: review?(gene.lian) → review+
Updated•11 years ago
|
Attachment #8334743 -
Flags: review?(gene.lian) → review+
Comment 46•11 years ago
|
||
Comment on attachment 8334748 [details] [diff] [review]
part 3.f/4: share similar works to callback with a DOM message in a transaction
Review of attachment 8334748 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/mobilemessage/src/gonk/MobileMessageDatabaseService.js
@@ +1531,5 @@
> + notifyResult(Cr.NS_ERROR_FAILURE, null);
> + return;
> + }
> +
> + let capture = {};
Hmm... You are passing around an object to capture the messageRecod. Sounds a bit weird to me but I don't have better solutions. ;)
@@ +1797,5 @@
> + " envelopeId: " + envelopeId);
> }
>
> let self = this;
> + this.newTxnWithCallback(callback, function(aCapture, aTransaction,
Why do you pass in the |aTransaction|? I don't see any codes are using that? Did I misunderstand anything?
Attachment #8334748 -
Flags: review?(gene.lian)
Updated•11 years ago
|
Attachment #8334756 -
Flags: review?(gene.lian) → review+
Updated•11 years ago
|
Attachment #8334758 -
Flags: review?(gene.lian) → review+
Comment 47•11 years ago
|
||
Comment on attachment 8335154 [details] [diff] [review]
part 4.b/4: Gonk RIL implementation
Review of attachment 8335154 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/mobilemessage/src/gonk/MmsService.js
@@ +1878,5 @@
> +
> + // From OMA-TS-MMS_ENC-V1_3-20110913-A subclause 9.4 "X-Mms-Read-Status",
> + // in M-Read-Rec-Orig.ind the X-Mms-Read-Status could be
> + // MMS.MMS_READ_STATUS_{ READ, DELETED_WITHOUT_BEING_READ }.
> + let readStatus = mmsReadStatus ? MMS.DOM_READ_STATUS_SUCCESS
I assume |readStatus| will be assigned with MMS.DOM_READ_STATUS_SUCCESS only when |mmsReadStatus| == MMS.MMS_READ_STATUS_READ.
Please double check the "?" operator is correctly working right here. Thanks!
::: dom/mobilemessage/src/gonk/MobileMessageDatabaseService.js
@@ +2156,5 @@
> + ", receiver: " + aReceiver + ", readStatus: " + aReadStatus);
> + }
> +
> + let self = this;
> + this.newTxnWithCallback(aCallback, function(aCapture, aTransaction,
Again, I don't know why we need to input |aTransaction| which is not used in this callback. Please correct me if I misunderstood. Tentatively remove the review tag.
@@ +2176,5 @@
> + return;
> + }
> +
> + aEntry.readStatus = aReadStatus;
> + aEntry.readTimestamp = Date.now();
if (aReadStatus == MMS.DOM_READ_STATUS_SUCCESS) {
aEntry.readTimestamp = Date.now();
}
Attachment #8335154 -
Flags: review?(gene.lian)
Assignee | ||
Comment 48•11 years ago
|
||
(In reply to Gene Lian [:gene] (needinfo? encouraged) from comment #47)
> Comment on attachment 8335154 [details] [diff] [review]
> part 4.b/4: Gonk RIL implementation
>
> Review of attachment 8335154 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/mobilemessage/src/gonk/MmsService.js
> @@ +1878,5 @@
> > +
> > + // From OMA-TS-MMS_ENC-V1_3-20110913-A subclause 9.4 "X-Mms-Read-Status",
> > + // in M-Read-Rec-Orig.ind the X-Mms-Read-Status could be
> > + // MMS.MMS_READ_STATUS_{ READ, DELETED_WITHOUT_BEING_READ }.
> > + let readStatus = mmsReadStatus ? MMS.DOM_READ_STATUS_SUCCESS
>
> I assume |readStatus| will be assigned with MMS.DOM_READ_STATUS_SUCCESS only
> when |mmsReadStatus| == MMS.MMS_READ_STATUS_READ.
>
> Please double check the "?" operator is correctly working right here. Thanks!
"x-mms-read-status" is wired to BooleanValue, so there is no such thing "MMS.MMS_READ_STATUS_READ".
http://mxr.mozilla.org/mozilla-central/source/dom/mobilemessage/src/gonk/MmsPduHelper.jsm#1681
> ::: dom/mobilemessage/src/gonk/MobileMessageDatabaseService.js
> @@ +2156,5 @@
> > + ", receiver: " + aReceiver + ", readStatus: " + aReadStatus);
> > + }
> > +
> > + let self = this;
> > + this.newTxnWithCallback(aCallback, function(aCapture, aTransaction,
>
> Again, I don't know why we need to input |aTransaction| which is not used in
> this callback. Please correct me if I misunderstood. Tentatively remove the
> review tag.
No special reason. Just think might need sometime. Will remove.
> @@ +2176,5 @@
> > + return;
> > + }
> > +
> > + aEntry.readStatus = aReadStatus;
> > + aEntry.readTimestamp = Date.now();
>
> if (aReadStatus == MMS.DOM_READ_STATUS_SUCCESS) {
> aEntry.readTimestamp = Date.now();
> }
Hmmm, that justifies the attribute name 'readTimestamp'. Will correct it.
Assignee | ||
Comment 49•11 years ago
|
||
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #48)
> "x-mms-read-status" is wired to BooleanValue, so there is no such thing
> "MMS.MMS_READ_STATUS_READ".
Similar BooleanValue wired header fields are:
1) "x-mms-cancel-status": Cancel Request Successfully received | Cancel Request corrupted
2) "x-mms-sender-visibility": Hide | Show
3) "x-mms-read-status": Read | Deleted without being read
"x-mms-sender-visibility" will be the most confusing one because "true" means "hide" and "false" means "show".
Assignee | ||
Comment 50•11 years ago
|
||
rebase only.
Attachment #8334724 -
Attachment is obsolete: true
Attachment #8336742 -
Flags: review+
Assignee | ||
Comment 51•11 years ago
|
||
check property exists by |hasOwnProperty| before delete it.
Attachment #8334738 -
Attachment is obsolete: true
Attachment #8336747 -
Flags: review+
Assignee | ||
Comment 52•11 years ago
|
||
address comment 46 -- remove aTransaction argument.
Attachment #8334748 -
Attachment is obsolete: true
Attachment #8336749 -
Flags: review?(gene.lian)
Assignee | ||
Comment 53•11 years ago
|
||
rebase only.
Attachment #8334756 -
Attachment is obsolete: true
Attachment #8336751 -
Flags: review+
Assignee | ||
Comment 54•11 years ago
|
||
Attachment #8336753 -
Flags: review?(gene.lian)
Assignee | ||
Comment 55•11 years ago
|
||
1) use MMS.MMS_PDU_READ_STATUS_READ
2) remove 'aTransaction' argument from 'newTxnWithCallback'
Attachment #8335154 -
Attachment is obsolete: true
Attachment #8336756 -
Flags: review?(gene.lian)
Assignee | ||
Comment 56•11 years ago
|
||
Updated•11 years ago
|
Attachment #8336749 -
Flags: review?(gene.lian) → review+
Comment 57•11 years ago
|
||
Comment on attachment 8336756 [details] [diff] [review]
part 4.b/4: Gonk RIL implementation : v2
Review of attachment 8336756 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/mobilemessage/src/gonk/MobileMessageDatabaseService.js
@@ +1227,5 @@
> }
>
> + // For all sent and received MMS messages, we have to add their
> + // |readStatus| and |readTimestamp| attributes in |deliveryInfo| array.
> + let isReadReportRequested =
s/isReadReportRequested/readReportRequested
to have a more consistent coding style since we're just having a bug doing so.
@@ +1230,5 @@
> + // |readStatus| and |readTimestamp| attributes in |deliveryInfo| array.
> + let isReadReportRequested =
> + messageRecord.headers["x-mms-read-report"] || false;
> + for (let element of messageRecord.deliveryInfo) {
> + element.readStatus = isReadReportRequested
s/isReadReportRequested/readReportRequested
@@ +2189,5 @@
> + return;
> + }
> +
> + aEntry.readStatus = aReadStatus;
> + aEntry.readTimestamp = Date.now();
Comment #48.
if (aReadStatus == MMS.DOM_READ_STATUS_SUCCESS) {
aEntry.readTimestamp = Date.now();
}
Attachment #8336756 -
Flags: review?(gene.lian) → review+
Comment 58•11 years ago
|
||
Comment on attachment 8334712 [details] [diff] [review]
part 1/4: interface changes : v2
Review of attachment 8334712 [details] [diff] [review]:
-----------------------------------------------------------------
Sorry I have to pull back the review+. Please see Bug 939302. We'd better use long-long to specify timestamps. Sorry we have to fix some other patches as well.
Attachment #8334712 -
Flags: review+ → review-
Updated•11 years ago
|
Attachment #8336753 -
Flags: review?(gene.lian) → review+
Assignee | ||
Comment 59•11 years ago
|
||
Comment on attachment 8334712 [details] [diff] [review]
part 1/4: interface changes : v2
Bug 939302 is not even fully reviewed.
Attachment #8334712 -
Flags: review- → review+
Comment 60•11 years ago
|
||
No, the DOM IDL part has been reviewed by Jonas and Boris.
Assignee | ||
Comment 61•11 years ago
|
||
Address comment 57.
Attachment #8336756 -
Attachment is obsolete: true
Attachment #8337553 -
Flags: review+
Assignee | ||
Comment 62•11 years ago
|
||
rebase only.
Attachment #8334712 -
Attachment is obsolete: true
Attachment #8337554 -
Flags: review+
Assignee | ||
Comment 63•11 years ago
|
||
(In reply to Gene Lian [:gene] (needinfo? encouraged) from comment #60)
> No, the DOM IDL part has been reviewed by Jonas and Boris.
I said "fully" reviewed. Besides, don't forget there are plenty of test cases to fix.
Assignee | ||
Comment 64•11 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/89433bb31453
https://hg.mozilla.org/integration/b2g-inbound/rev/94f875f9a8de
https://hg.mozilla.org/integration/b2g-inbound/rev/4780d72117e3
https://hg.mozilla.org/integration/b2g-inbound/rev/307e7260ada2
https://hg.mozilla.org/integration/b2g-inbound/rev/6bdd99eabb57
https://hg.mozilla.org/integration/b2g-inbound/rev/8446a3ac5060
https://hg.mozilla.org/integration/b2g-inbound/rev/529304b6bd08
https://hg.mozilla.org/integration/b2g-inbound/rev/a9664889638e
https://hg.mozilla.org/integration/b2g-inbound/rev/dc75d4de9df4
https://hg.mozilla.org/integration/b2g-inbound/rev/dafc51a29fb3
https://hg.mozilla.org/integration/b2g-inbound/rev/f38875c274c0
https://hg.mozilla.org/integration/b2g-inbound/rev/f668eb3f9829
Comment 65•11 years ago
|
||
Hi Vicamo,
sorry had to backout this changes in https://hg.mozilla.org/integration/b2g-inbound/pushloghtml?changeset=70779672ea78 because this checkin caused a bustage on Windows XP Debug builds with the error mentioned here https://tbpl.mozilla.org/php/getParsedLog.php?id=31032938&tree=B2g-Inbound
Assignee | ||
Comment 66•11 years ago
|
||
(In reply to Carsten Book [:Tomcat] from comment #65)
> Hi Vicamo,
>
> sorry had to backout this changes in
> https://hg.mozilla.org/integration/b2g-inbound/
> pushloghtml?changeset=70779672ea78 because this checkin caused a bustage on
> Windows XP Debug builds with the error mentioned here
> https://tbpl.mozilla.org/php/getParsedLog.php?id=31032938&tree=B2g-Inbound
I think that's a CLOBBER issue actually.
Assignee | ||
Comment 67•11 years ago
|
||
full try with original patches: https://tbpl.mozilla.org/?tree=Try&rev=b79196ac95fe
Comment 68•11 years ago
|
||
Hey Vicamo, when the try run pass could you touch the clobber file.
You should also then file a "clobber was needed for foo" bug for that touch of the clobber file.
Assignee | ||
Comment 69•11 years ago
|
||
(In reply to Carsten Book [:Tomcat] from comment #68)
> Hey Vicamo, when the try run pass could you touch the clobber file.
> You should also then file a "clobber was needed for foo" bug for that touch
> of the clobber file.
No, I'll have an additional clobber patch at the end. Technically we haven't land anything. See bug 938950, bug 934646. Don't need to file a new bug for the clobber.
Assignee | ||
Comment 70•11 years ago
|
||
Assignee | ||
Comment 71•11 years ago
|
||
Re-land with one additional patch for clobber as part 4.c/4.
https://hg.mozilla.org/integration/b2g-inbound/rev/a180721f1f8b
https://hg.mozilla.org/integration/b2g-inbound/rev/08a2163d4000
https://hg.mozilla.org/integration/b2g-inbound/rev/1cce6e770603
https://hg.mozilla.org/integration/b2g-inbound/rev/a60a1b5e511b
https://hg.mozilla.org/integration/b2g-inbound/rev/535b84dce91b
https://hg.mozilla.org/integration/b2g-inbound/rev/601e0b7b0ff5
https://hg.mozilla.org/integration/b2g-inbound/rev/c7112ca224bb
https://hg.mozilla.org/integration/b2g-inbound/rev/6f154a172ad5
https://hg.mozilla.org/integration/b2g-inbound/rev/a66f5c500b6f
https://hg.mozilla.org/integration/b2g-inbound/rev/694c768df2ed
https://hg.mozilla.org/integration/b2g-inbound/rev/f17fc9d77dec
https://hg.mozilla.org/integration/b2g-inbound/rev/8d558039569a
https://hg.mozilla.org/integration/b2g-inbound/rev/5f27eb843a1e
Comment 72•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a180721f1f8b
https://hg.mozilla.org/mozilla-central/rev/08a2163d4000
https://hg.mozilla.org/mozilla-central/rev/1cce6e770603
https://hg.mozilla.org/mozilla-central/rev/a60a1b5e511b
https://hg.mozilla.org/mozilla-central/rev/535b84dce91b
https://hg.mozilla.org/mozilla-central/rev/601e0b7b0ff5
https://hg.mozilla.org/mozilla-central/rev/c7112ca224bb
https://hg.mozilla.org/mozilla-central/rev/6f154a172ad5
https://hg.mozilla.org/mozilla-central/rev/a66f5c500b6f
https://hg.mozilla.org/mozilla-central/rev/694c768df2ed
https://hg.mozilla.org/mozilla-central/rev/f17fc9d77dec
https://hg.mozilla.org/mozilla-central/rev/8d558039569a
https://hg.mozilla.org/mozilla-central/rev/5f27eb843a1e
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → 1.3 Sprint 6 - 12/6
Comment 74•11 years ago
|
||
This landed before gecko 28 branched so will be in 1.3.
blocking-b2g: 1.3? → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•