Bug 1268455 - Restore <activity-alias> to avoid disappearing home screen shortcuts. r?margaret draft
authorSebastian Kaspari <s.kaspari@gmail.com>
Tue, 03 May 2016 11:16:20 +0200
changeset 362830 d6e84902fd8f763676ed315d8da9f9da96eb5c8c
parent 362808 3fc88e045b865c3a9c1deb1f90f7c0c92b167d9c
child 519884 3fc0c7f29b8adc3c198e72fa1c1adc0d8ded7a9a
push id17041
push users.kaspari@gmail.com
push dateTue, 03 May 2016 09:34:43 +0000
reviewersmargaret
bugs1268455
milestone49.0a1
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
mobile/android/base/AndroidManifest.xml.in
--- 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" />