Bug 1032217 - Export gecko.{WebApp,BrowserApp}. r=bnicholson

This allows explicit intents from outside of the App.  Tested locally by:

* creating and launching a home screen shortcut; (the presenting issue)

* trying a an "old style" webapp home screen launch, like:

adb shell am start -a org.mozilla.gecko.WEBAPP -n org.mozilla.fennec_nalexander/.Webapp -d http://penguinpop.justplaymobile.com/penguinpop.webapp

and

adb shell am start -a org.mozilla.gecko.WEBAPP -n org.mozilla.fennec_nalexander/org.mozilla.gecko.Webapp -d http://penguinpop.justplaymobile.com/penguinpop.webapp

Both log the expected message in the dispatcher:

W GeckoWebappImpl(12501)      no package name; treating as legacy shortcut

Both fail with:

E GeckoConsole(12177)         Error getting pref for application/x-web-app-manifest+json.

I verified that this behaviour happens with the Nightly of June 24, 2014 -- the
one right before the patch that introduced this regression.
This commit is contained in:
Nick Alexander 2014-07-18 09:39:56 -07:00
Родитель be07a25f1f
Коммит be74041ced
1 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -106,7 +106,13 @@
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize|locale|layoutDirection"
android:windowSoftInputMode="stateUnspecified|adjustResize"
android:launchMode="singleTask"
android:exported="true"
android:theme="@style/Gecko.App">
<!-- We export this activity so that it can be launched by explicit
intents, in particular homescreen shortcuts. See Bug 1032217.
In future we would prefer to move all intent filters off the .App
alias and onto BrowserApp so that we can deprecate activities
that refer to pre-processed class names. -->
</activity>
<!-- Fennec is shipped as the Android package named
@ -255,10 +261,16 @@
android:taskAffinity="org.mozilla.gecko.WEBAPP"
android:process=":@ANDROID_PACKAGE_NAME@.Webapp"
android:excludeFromRecents="true"
android:exported="true"
android:theme="@style/Gecko.App">
<!-- We export this activity so that it can be launched by explicit
intents, in particular old-style WebApp launching homescreen
shortcuts. Such shortcuts were made before the new "synthetic
APK" WebApps were deployed. See Bug 1032217. -->
</activity>
<!-- Alias Webapp so we can launch it from the package namespace. -->
<!-- Alias Webapp so we can launch it from the package namespace. Prefer
to launch with the fully qualified name "org.mozilla.gecko.Webapp". -->
<activity-alias android:name=".Webapp"
android:label="@string/webapp_generic_name"
android:targetActivity="org.mozilla.gecko.Webapp">