Bug 1256615 - Partially restore removed <activity-alias>. r=sebastian a=ritu
authorNick Alexander <nalexander@mozilla.com>
Mon, 21 Mar 2016 13:42:08 -0700
changeset 323658 8996aca3a0059565159bad5053358df3541c95b1
parent 323657 912b16ab7c907a05699720eea3c154c2cc303191
child 323659 ed13ee665951eb8b39bbc925209e191d6af767e5
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian, ritu
bugs1256615, 1242213
milestone47.0a2
Bug 1256615 - Partially restore removed <activity-alias>. r=sebastian a=ritu Bug 1242213 removed the entire <activity-alias>. Sadly, users who added the Firefox icon to their dock (for example, Samsung's Touchwiz dock) will see the icon disappear when they upgrade, because the intent filter disappears. (That is, the icon is connected to .App and action MAIN, not to the package and action MAIN.) This patch restores the .App <activity-alias> for action MAIN. It doesn't add the launcher and other categories, which could lead to multiple launcher icons. New users that add the Firefox icon to their dock will use .BrowserApp, but sadly we'll need to maintain this alias essentially forever to support existing dock icons. MozReview-Commit-ID: 1o9XS5MEs1s
mobile/android/base/AndroidManifest.xml.in
--- a/mobile/android/base/AndroidManifest.xml.in
+++ b/mobile/android/base/AndroidManifest.xml.in
@@ -136,16 +136,28 @@
 
             <!-- 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" />
 
         <!-- The main reason for the Tab Queue build flag is to not mess with the VIEW intent filter
              before the rest of the plumbing is in place -->