Bug 1268455 - Restore <activity-alias> to avoid disappearing home screen shortcuts. r?margaret
This patch restores our previous <activity-alias> with all intent filters. Changing the alias
will cause that existing home screen shortcuts disappear.
I tested this patch with:
* Upgrading old state (2016-02-06) to current state: Icon disappears (expected)
* Upgrading old state to fixed state (this patch): Icon remains
As this patch changes the activity-alias again, releasing this patch will lead to the home
screen shortcut disappearing once more for all released version with the current state:
* Upgrading current state to fixed state: Icon disappears (expected)
MozReview-Commit-ID: 1crKmkp4G1L
--- a/mobile/android/base/AndroidManifest.xml.in
+++ b/mobile/android/base/AndroidManifest.xml.in
@@ -52,17 +52,24 @@
<activity android:name="@MOZ_ANDROID_BROWSER_INTENT_CLASS@"
android:label="@string/moz_app_displayname"
android:taskAffinity="@ANDROID_PACKAGE_NAME@.BROWSER"
android:alwaysRetainTaskState="true"
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize|locale|layoutDirection|smallestScreenSize|screenLayout"
android:windowSoftInputMode="stateUnspecified|adjustResize"
android:launchMode="singleTask"
android:exported="true"
- android:theme="@style/Gecko.App">
+ android:theme="@style/Gecko.App" />
+
+ <!-- Bug 1256615 / Bug 1268455: We published an .App alias and we need to maintain it
+ forever. If we don't, home screen shortcuts will disappear because the intent
+ filter details change. -->
+ <activity-alias android:name=".App"
+ android:label="@MOZ_APP_DISPLAYNAME@"
+ android:targetActivity="@MOZ_ANDROID_BROWSER_INTENT_CLASS@">
<!-- android:priority ranges between -1000 and 1000. We never want
another activity to usurp the MAIN action, so we ratchet our
priority up. -->
<intent-filter android:priority="999">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
@@ -134,28 +141,16 @@
</intent-filter>
#endif
<!-- For debugging -->
<intent-filter>
<action android:name="org.mozilla.gecko.DEBUG" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
- </activity>
-
- <!-- Bug 1256615: We published a .App alias and we need to maintain it
- forever. If we don't, dock icons (e.g., Samsung Touchwiz icons)
- will disappear because the intent filter details change. -->
- <activity-alias android:name=".App"
- android:label="@MOZ_APP_DISPLAYNAME@"
- android:targetActivity="@MOZ_ANDROID_BROWSER_INTENT_CLASS@">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
</activity-alias>
<service android:name="org.mozilla.gecko.GeckoService" />
<activity android:name="org.mozilla.gecko.trackingprotection.TrackingProtectionPrompt"
android:launchMode="singleTop"
android:theme="@style/OverlayActivity" />