Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

FIX: install/update app with permissions on b2g instance #263

Merged
merged 5 commits into from Jan 25, 2013

Conversation

rpl
Copy link
Member

@rpl rpl commented Jan 23, 2013

This change hooks the new remote webappsActor to install apps into a b2g instance
using mozApps internals, so application permissions will be registered and
correctly available.

This merge should fix: #237

@digitarald
Copy link
Contributor

Hooray!

Only issue I run into when using the actor (from my own xpcshell script), was that re-installs didn't work as expected. Like adding/removing fullscreen or other properties from the manifest wasn't recognized until I uninstalled the app and rebooted the phone.

@rpl
Copy link
Member Author

rpl commented Jan 24, 2013

Currently I left intact the method we use to remove applications and I get a reasonable doubt that in this way some information (such as permissions that are registered and de-registered during the installation and uninstallation) will be left in the system.

I need to go a bit deeper (although in the end the real solution is surely to provide the opposite function into an debugger server actor)


remote.client.request({to: remote.webapps, type: "install", appId: appId,
appType: appType},
onResponse);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this would be easier to read if the object argument was more structured:

remote.client.request({ to: remote.webapps,
                        type: "install",
                        appId: appId,
                        appType: appType },
                      onResponse);

That also makes the lines short enough to enable you to call request() directly on this._remote.client without exceeding 80 characters per line, so you don't have to assign it a local variable that then only gets used once:

this._remote.client.request({ to: remote.webapps,
                              type: "install",
                              appId: appId,
                              appType: appType },
                            onResponse);

@rpl
Copy link
Member Author

rpl commented Jan 25, 2013

I've introduced suggested code cleanup and fixed a regression (due to new app install method and b2g install forced kill)

In the last commit I've removed from tab worker message handler any simulator.kill used from the previous install/upgrade method.

I've not been yet able to study more deeply potential problems related to the cases mentioned by @digitarald

mykmelez added a commit that referenced this pull request Jan 25, 2013
FIX: install/update app with permissions on b2g instance
@mykmelez mykmelez merged commit 9f4209f into mozilla:master Jan 25, 2013
@mykmelez
Copy link
Contributor

Thanks for the fixes!

@rpl rpl deleted the fix-b2g-install-app-permissions branch January 25, 2013 01:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

install/update apps using mozApps API
3 participants