mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1201145 - Make android intent & web activities coexist peacefully r=snorp
This commit is contained in:
parent
486eb86701
commit
bfcb2e2e41
@ -12,6 +12,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/IndexedDBHelper.jsm");
|
||||
Cu.import("resource://gre/modules/AppsUtils.jsm");
|
||||
Cu.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "DOMApplicationRegistry",
|
||||
"resource://gre/modules/Webapps.jsm");
|
||||
@ -322,10 +323,17 @@ let Activities = {
|
||||
// Don't do this check until we have passed to UIGlue so the glue
|
||||
// can choose to launch its own activity if needed.
|
||||
if (aResults.options.length === 0) {
|
||||
self.trySendAndCleanup(aMsg.id, "Activity:FireError", {
|
||||
"id": aMsg.id,
|
||||
"error": "NO_PROVIDER"
|
||||
});
|
||||
if (AppConstants.MOZ_B2GDROID) {
|
||||
// Fallback on the Android Intent mapper.
|
||||
let glue = Cc["@mozilla.org/dom/activities/android-ui-glue;1"]
|
||||
.createInstance(Ci.nsIActivityUIGlue);
|
||||
glue.chooseActivity(aMsg.options, aResults.options, getActivityChoice);
|
||||
} else {
|
||||
self.trySendAndCleanup(aMsg.id, "Activity:FireError", {
|
||||
"id": aMsg.id,
|
||||
"error": "NO_PROVIDER"
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -419,6 +419,7 @@
|
||||
@BINPATH@/components/htmlMenuBuilder.manifest
|
||||
|
||||
@BINPATH@/components/Activities.manifest
|
||||
@BINPATH@/components/AndroidActivitiesGlue.js
|
||||
@BINPATH@/components/ActivitiesGlue.js
|
||||
@BINPATH@/components/ActivityProxy.js
|
||||
@BINPATH@/components/ActivityRequestHandler.js
|
||||
|
@ -119,6 +119,10 @@ category update-timer Snippets @mozilla.org/snippets;1,getService,snippets-updat
|
||||
component {430b987f-bb9f-46a3-99a5-241749220b29} ColorPicker.js
|
||||
contract @mozilla.org/colorpicker;1 {430b987f-bb9f-46a3-99a5-241749220b29}
|
||||
|
||||
# ActivitiesGlue.js
|
||||
component {e4deb5f6-d5e3-4fce-bc53-901dd9951c48} ActivitiesGlue.js
|
||||
# AndroidActivitiesGlue.js
|
||||
component {e4deb5f6-d5e3-4fce-bc53-901dd9951c48} AndroidActivitiesGlue.js
|
||||
#ifdef MOZ_B2GDROID
|
||||
contract @mozilla.org/dom/activities/android-ui-glue;1 {e4deb5f6-d5e3-4fce-bc53-901dd9951c48}
|
||||
#else
|
||||
contract @mozilla.org/dom/activities/ui-glue;1 {e4deb5f6-d5e3-4fce-bc53-901dd9951c48}
|
||||
#endif
|
||||
|
@ -12,8 +12,8 @@ XPIDL_MODULE = 'MobileComponents'
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'AboutRedirector.js',
|
||||
'ActivitiesGlue.js',
|
||||
'AddonUpdateService.js',
|
||||
'AndroidActivitiesGlue.js',
|
||||
'BlocklistPrompt.js',
|
||||
'BrowserCLH.js',
|
||||
'ColorPicker.js',
|
||||
|
@ -414,7 +414,7 @@
|
||||
@BINPATH@/components/htmlMenuBuilder.manifest
|
||||
|
||||
@BINPATH@/components/Activities.manifest
|
||||
@BINPATH@/components/ActivitiesGlue.js
|
||||
@BINPATH@/components/AndroidActivitiesGlue.js
|
||||
@BINPATH@/components/ActivityProxy.js
|
||||
@BINPATH@/components/ActivityRequestHandler.js
|
||||
@BINPATH@/components/ActivityWrapper.js
|
||||
|
Loading…
Reference in New Issue
Block a user