Bug 985614- Trigger onsuccess for package install from marketplace. r=myk

This commit is contained in:
Martyn Haigh 2014-06-03 05:13:00 -04:00
parent becb9eed50
commit 3dd4b21c70
2 changed files with 4 additions and 2 deletions

View File

@ -2529,7 +2529,9 @@ this.DOMApplicationRegistry = {
yield this._saveApps();
this.broadcastMessage("Webapps:AddApp", { id: id, app: appObject });
if (aData.isPackage && aData.autoInstall) {
// The presence of a requestID means that we have a page to update.
if (aData.isPackage && aData.apkInstall && !aData.requestID) {
// Skip directly to onInstallSuccessAck, since there isn't
// a WebappsRegistry to receive Webapps:Install:Return:OK and respond
// Webapps:Install:Return:Ack when an app is being auto-installed.

View File

@ -248,8 +248,8 @@ this.WebappManager = {
message.app.manifest = aData.manifest;
message.app.apkPackageName = aData.apkPackageName;
message.profilePath = aData.profilePath;
message.autoInstall = true;
message.mm = mm;
message.apkInstall = true;
DOMApplicationRegistry.registryReady.then(() => {
switch (aData.type) { // can be hosted or packaged.