Closed Bug 1260444 Opened 4 years ago Closed 3 years ago

Remove all uses of the System Messages API

Categories

(Firefox OS Graveyard :: Gaia, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: benfrancis, Unassigned)

References

Details

As we remove the System Messages API we need to find alternative solutions to all of its use cases.

Starting with the system app, here are the list of messages it listens to as defined in the app manifest:


     { "alarm": "/index.html" },
     { "bluetooth-opp-transfer-complete": "/index.html" },
     { "bluetooth-opp-update-progress": "/index.html" },
     { "bluetooth-opp-receiving-file-confirmation": "/index.html" },
     { "bluetooth-opp-transfer-start": "/index.html" },
     { "icc-stkcommand": "/index.html" },
     { "cdma-info-rec-received": "/index.html" },
     { "nfc-manager-tech-discovered": "/index.html" },
     { "nfc-manager-tech-lost": "/index.html" },
     { "nfc-manager-send-file": "/index.html" },
     { "bluetooth-pairing-request": "/index.html" },
     { "notification": "/index.html" },
     { "request-sync": "/index.html" }
Fabrice, do you have any ideas for replacing the above?

Interesting that all of these messages are handled by index.html. Could they just be chrome-only events?
Flags: needinfo?(fabrice)
My plan for that is indeed to use mozChromeEvents. The steps will be:
- implement a simple SystemMessage service in b2g/components, implementing the same interface as the current one.
- this new service will just relay calls to the system app through mozChromeEvents.
- the system app will decide what to do.

We can implement some kind of "system message router" in the system app where all the gaia apps will register which message they want to subscribe to, based on what we currently have in the manifests (maybe we can just parse the current manifests? I don't feel strongly about the solution for that).
Flags: needinfo?(fabrice)
Removing all uses in Gaia not in scope for the transition project. Let's take it case by case for the apps we need to get working, like bug 1261027.
No longer blocks: 1252143
(In reply to [:fabrice] Fabrice Desré from comment #2)

[...]

> 
> We can implement some kind of "system message router" in the system app
> where all the gaia apps will register which message they want to subscribe
> to, based on what we currently have in the manifests (maybe we can just
> parse the current manifests? I don't feel strongly about the solution for
> that).

I guess this is close to the NotificationsSystemMessage code we have in the system app right now: we have multiple users of system message notification within the system app so we needed a central point of contact to dispatch notifications system messages to each subcomponent
Depends on: 1267165
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.