mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 978143 - Propagate APK install cancellation back to webpage. r=wesj
This commit is contained in:
parent
1d611b64cf
commit
2af66b77f0
@ -183,7 +183,7 @@ public class EventListener implements NativeEventListener {
|
||||
}
|
||||
}
|
||||
|
||||
public static void installApk(final Activity context, NativeJSObject message, EventCallback callback) {
|
||||
public static void installApk(final Activity context, NativeJSObject message, final EventCallback callback) {
|
||||
final JSONObject messageData;
|
||||
|
||||
// We get the manifest url out of javascript here so we can use it as a checksum
|
||||
@ -237,6 +237,7 @@ public class EventListener implements NativeEventListener {
|
||||
// unregistered the receiver).
|
||||
Log.e(LOGTAG, "error unregistering install receiver: ", e);
|
||||
}
|
||||
callback.sendError("APK installation cancelled by user");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -500,6 +500,12 @@ this.WebappManager = {
|
||||
type: "Webapps:InstallApk",
|
||||
filePath: apk.filePath,
|
||||
data: msg,
|
||||
}, (data, error) => {
|
||||
if (!!error) {
|
||||
// There's no page to report back to so drop the error.
|
||||
// TODO: we should notify the user about this failure.
|
||||
debug("APK install failed : " + returnError);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user