Closed Bug 787175 Opened 12 years ago Closed 12 years ago

B2G RIL: Use system messages to notify proactive commands

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: philikon, Assigned: allstars.chh)

References

Details

Attachments

(1 file, 1 obsolete file)

Like bug 782488 and bug 782489, but for the STK. We want to notify the Settings app (or wherever the STK UI will be implemented).

Yoshi, can you take this? Thanks!
Assignee: nobody → allstars.chh
Status: NEW → ASSIGNED
Hi, philikon
This patch is based on patch from Bug 787064(already r+),
can you give me some feedback about this?

Thanks
Attachment #657112 - Flags: feedback?(philipp)
Comment on attachment 657112 [details] [diff] [review]
WIP - Patch to send system message

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

r=me with comments below addressed.

::: dom/system/gonk/RadioInterfaceLayer.js
@@ +94,5 @@
>  });
>  
> +XPCOMUtils.defineLazyGetter(this, "gSystemMessenger", function() {
> +  return Cc["@mozilla.org/system-message-internal;1"].getService(Ci.nsISystemMessagesInternal);
> +});

Please use XPCOM.defineLazyServiceGetter.

@@ +456,5 @@
>          this.handleStkProactiveCommand(message);
>          break;
>        case "stksessionend":
>          ppmm.broadcastAsyncMessage("RIL:StkSessionEnd", null);
> +        gSystemMessenger.broadcastMessage("stksessionend", null);

Why would we need to send this as a system message? I would imagine that by the time this event gets dispatched, the relevant app is already long active...

@@ +1032,5 @@
>    },
>  
>    handleStkProactiveCommand: function handleStkProactiveCommand(message) {
>      debug("handleStkProactiveCommand " + JSON.stringify(message));
> +    gSystemMessenger.broadcastMessage("stkcommand", message);

Maybe prefix the message name with "icc-"?
Attachment #657112 - Flags: feedback?(philipp)
Attachment #657112 - Flags: review+
Address to philikon's comments:
- add r=philikon,
- remove system message for stksessionend
- add icc- prefix for stkcommad.

Thanks
Attachment #657112 - Attachment is obsolete: true
Target Milestone: --- → mozilla17
Target Milestone: mozilla17 → mozilla18
https://hg.mozilla.org/mozilla-central/rev/15eacf38a2fb
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: