Closed
Bug 853782
Opened 13 years ago
Closed 13 years ago
Notify receiving of WAP Push messages
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox26 | --- | fixed |
People
(Reporter: chucklee, Assigned: chucklee)
References
Details
(Whiteboard: [fixed-in-birch])
Attachments
(4 files, 5 obsolete files)
|
2.40 KB,
patch
|
Details | Diff | Splinter Review | |
|
2.22 KB,
text/x-patch
|
Details | |
|
5.51 KB,
patch
|
Details | Diff | Splinter Review | |
|
14.74 KB,
patch
|
vicamo
:
review+
|
Details | Diff | Splinter Review |
After WAP Push message is received(and decoded if its' content type is supported), web/system apps need to be notified with message data.
several notifications need to be provided: system message, .addlistener() and .onreceive.
Updated•13 years ago
|
Whiteboard: RN5/29
Updated•13 years ago
|
Whiteboard: RN5/29 → RN6/14
Updated•13 years ago
|
Whiteboard: RN6/14 → RN6/18
| Assignee | ||
Comment 1•13 years ago
|
||
Attachment #762514 -
Flags: review?(vyang)
| Assignee | ||
Comment 2•13 years ago
|
||
Attachment #762515 -
Flags: review?(vyang)
| Assignee | ||
Comment 3•13 years ago
|
||
In emulator, stringTable.slice() doesn't exist. But it passed xpcshell test.
So get string data based on supported function.
Attachment #762517 -
Flags: review?(vyang)
| Assignee | ||
Comment 4•13 years ago
|
||
Test PDU : WBXML compressed SI
emulator command : sms pdu 00400191F10024001010000000005A0605040B8423F0010603AEAF8202056A28656D61696C2F3132332F6162632E776D6C00596F7520686176652034206E657720656D61696C730045C60D0378797A008583000AC3071999062515231510C304199906300183120101
Expected system message content :
message.contentType: text/vnd.wap.si
message.content: <si><indication href="http://www.xyz.com/email/123/abc.wml" created="1999-06-25T15:23:15Z" si-expires="1999-06-30T00:00:00Z">You have 4 new emails</indication></si>
| Assignee | ||
Comment 5•13 years ago
|
||
Test PDU : WBXML compressed SL
emulator command : sms pdu 00400191F10024001010000000001F0605040B8423F0010603B0AF8203066A086F7265696C6C7900850A83008501
Expected system message content :
message.contentType: text/vnd.wap.sl
message.content: <sl href="http://www.oreilly.com/"/>
| Assignee | ||
Comment 6•13 years ago
|
||
Use sms app to receive WAP Push system message, and dump content to logcat.
Comment 7•13 years ago
|
||
Comment on attachment 762514 [details] [diff] [review]
0001. Set content type of decoded wap push message.
Review of attachment 762514 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/wappush/src/gonk/SiPduHelper.jsm
@@ +99,5 @@
> }
>
> WBXML.PduHelper.parse(data, appToken, msg);
>
> + // Content is plain text now
Please remove this line. Content-Type doesn't even exist before this patch.
::: dom/wappush/src/gonk/SlPduHelper.jsm
@@ +54,5 @@
> }
>
> WBXML.PduHelper.parse(data, appToken, msg);
>
> + // Content is plain text now
Ditto.
Attachment #762514 -
Flags: review?(vyang) → review+
Comment 8•13 years ago
|
||
Comment on attachment 762515 [details] [diff] [review]
0002. Notify receiving of WAP Push by System Message.
Review of attachment 762515 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/wappush/src/gonk/WapPushManager.js
@@ +95,3 @@
> } else if (contentType === "text/vnd.wap.connectivity-xml" ||
> contentType === "application/vnd.wap.connectivity-wbxml") {
> // TODO: Bug 869291 - Support Receiving WAP-Push-CP
Please remove this |else-if| block and move that TODO line into |else|. Before bug 869291 is ready, CP is an unsupported type, isn't it?
@@ +96,5 @@
> contentType === "application/vnd.wap.connectivity-wbxml") {
> // TODO: Bug 869291 - Support Receiving WAP-Push-CP
> } else {
> // Unsupported type, provide raw data.
> msg.content = data.array;
Missing contentType for unsupported types.
Attachment #762515 -
Flags: review?(vyang) → review+
Comment 9•13 years ago
|
||
Comment on attachment 762517 [details] [diff] [review]
0003. Fix runtime error due to no slice() function in emulator.
Review of attachment 762517 [details] [diff] [review]:
-----------------------------------------------------------------
Please correct the title. There is nothing related to the emulator itself. The reason you got a runtime error is because |data.array| is actually always a TypedArray. And the reason we still have similar code in |WSP.Octet.decodeMultiple| is the lack of some code clean-up to remove them.
::: dom/wappush/src/gonk/WbxmlPduHelper.jsm
@@ +71,5 @@
> + let rangeData;
> + if (stringTable.subarray) {
> + rangeData = stringTable.subarray(start, end);
> + } else if (stringTable.slice) {
> + rangeData = stringTable.slice(start, end);
You don't need all these tests and that unused |rangeData| variable. |stringTable| here is always a TypedArray.
Attachment #762517 -
Flags: review?(vyang)
| Assignee | ||
Comment 10•13 years ago
|
||
Attachment #762514 -
Attachment is obsolete: true
Attachment #763438 -
Flags: review?(vyang)
| Assignee | ||
Comment 11•13 years ago
|
||
Update patch for comment 8 is addressed in part 1.
Attachment #762515 -
Attachment is obsolete: true
| Assignee | ||
Comment 12•13 years ago
|
||
PDU get from worker is TypedArray, while PDU from xpcshell test case is array.
So support both type until test cases are changed to use TypedArray.
Attachment #762517 -
Attachment is obsolete: true
Attachment #763441 -
Flags: review?(vyang)
Comment 13•13 years ago
|
||
Comment on attachment 763438 [details] [diff] [review]
0001. Set content type of wap push message. V2
Review of attachment 763438 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/wappush/src/gonk/WapPushManager.js
@@ +79,5 @@
> *
> * @see http://technical.openmobilealliance.org/tech/omna/omna-wsp-content-type.aspx
> */
> let contentType = options.headers["content-type"].media;
> + let msg = {};
This line may soon overwritten when the message is of a supported type. You may just declare a variable here.
let msg;
@@ +96,1 @@
> msg.content = data.array;
msg = {
...
};
Attachment #763438 -
Flags: review?(vyang) → review+
Updated•13 years ago
|
Attachment #763441 -
Flags: review?(vyang) → review+
| Assignee | ||
Comment 14•13 years ago
|
||
Address comment 13
Attachment #763438 -
Attachment is obsolete: true
| Assignee | ||
Comment 15•13 years ago
|
||
It requires modification in test case per part 0001, so also correct the type of data PDU.
Attachment #763441 -
Attachment is obsolete: true
Attachment #763487 -
Flags: review?(vyang)
| Assignee | ||
Comment 17•13 years ago
|
||
Updated•13 years ago
|
Attachment #763487 -
Flags: review?(vyang) → review+
Comment 18•13 years ago
|
||
https://hg.mozilla.org/projects/birch/rev/183501e0a905
https://hg.mozilla.org/projects/birch/rev/5026554ec28f (differ from 763439, has to be rebased)
https://hg.mozilla.org/projects/birch/rev/68ce74382b35
Whiteboard: RN6/18 → [fixed-in-birch]
Comment 19•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/183501e0a905
https://hg.mozilla.org/mozilla-central/rev/5026554ec28f
https://hg.mozilla.org/mozilla-central/rev/68ce74382b35
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Updated•12 years ago
|
blocking-b2g: --- → koi+
Updated•12 years ago
|
status-firefox26:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•