Bug 1268455 - Restore <activity-alias> to avoid disappearing home screen shortcuts. r=margaret, a=ritu
authorSebastian Kaspari <s.kaspari@gmail.com>
Tue, 03 May 2016 11:16:20 +0200
changeset 332812 4c5959b81fd5b61fe854f2d2e0743afa66f9aa07
parent 332811 2c40e21dafaa718d667bb2718f0f36f402b67614
child 332813 7772a4493512048d88004e020e1a13eda7a6d857
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret, ritu
bugs1268455
milestone48.0a2
Bug 1268455 - Restore <activity-alias> to avoid disappearing home screen shortcuts. r=margaret, a=ritu 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" />