Commit 6a93949e authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

[AW] Add unique task affinity string to DevUI activities

- Add task affinity string to DevUI activities so they would be launched
  in a separate task other than the app's task (especially useful in
  Monochrome case).
- Explicitly define an icon for MainActivity (rather than the
  activity-alias), so this icon is used in the Android task switcher as
  well as for the launcher icon.

Bug: 1044294
Test: Launch Monochrome browser and DevUI, check they show in separate tasks and use different icons in app switcher
Change-Id: I0bbeda3b01ea24475cdc6dabd148b8e6c3c722d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032845
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avatarHazem Ashmawy <hazems@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738033}
parent 5e13b40c
......@@ -36,8 +36,10 @@
<!--suppress HardcodedText -->
<activity android:name="org.chromium.android_webview.devui.MainActivity"
android:label="WebView DevTools"
android:icon="@drawable/icon_webview"
android:theme="@style/Theme.DevUi.DayNight"
android:launchMode="singleTask"
android:taskAffinity="org.chromium.android_webview.devui" {# Explicit taskAffinity to distinguish from monochrome browser task. #}
android:process=":webview_apk"> {# Explicit process required for monochrome compatibility. #}
<intent-filter>
<action android:name="com.android.webview.SHOW_DEV_UI" />
......@@ -53,12 +55,14 @@
android:label="WebView Crashes"
android:theme="@style/Theme.DevUi.DayNight"
android:launchMode="singleTop"
android:taskAffinity="org.chromium.android_webview.devui" {# Explicit taskAffinity to distinguish from monochrome browser task. #}
android:process=":webview_apk"> {# Explicit process required for monochrome compatibility. #}
</activity>
<activity android:name="org.chromium.android_webview.devui.FlagsActivity"
android:label="WebView Flags"
android:theme="@style/Theme.DevUi.DayNight"
android:launchMode="singleTop"
android:taskAffinity="org.chromium.android_webview.devui" {# Explicit taskAffinity to distinguish from monochrome browser task. #}
android:process=":webview_apk"> {# Explicit process required for monochrome compatibility. #}
</activity>
<!-- End of WebView Developer UI Activities -->
......
......@@ -16,7 +16,6 @@
<activity-alias android:name="org.chromium.android_webview.devui.MonochromeLauncherActivity"
android:targetActivity="org.chromium.android_webview.devui.MainActivity"
android:label="WebView DevTools"
android:icon="@drawable/icon_webview"
android:exported="true"
android:enabled="false">
<intent-filter>
......
......@@ -995,6 +995,20 @@
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity
android:icon="@drawable/icon_webview"
android:label="WebView
DevTools"
android:launchMode="singleTask"
android:name="org.chromium.android_webview.devui.MainActivity"
android:process=":webview_apk"
android:taskAffinity="org.chromium.android_webview.devui"
android:theme="@style/Theme.DevUi.DayNight">
<intent-filter>
<action android:name="com.android.webview.SHOW_DEV_UI"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity
android:label="@string/license_activity_title"
android:name="org.chromium.android_webview.nonembedded.LicenseActivity"
......@@ -1013,25 +1027,15 @@
android:launchMode="singleTop"
android:name="org.chromium.android_webview.devui.CrashesListActivity"
android:process=":webview_apk"
android:taskAffinity="org.chromium.android_webview.devui"
android:theme="@style/Theme.DevUi.DayNight"/>
<activity
android:label="WebView
DevTools"
android:launchMode="singleTask"
android:name="org.chromium.android_webview.devui.MainActivity"
android:process=":webview_apk"
android:theme="@style/Theme.DevUi.DayNight">
<intent-filter>
<action android:name="com.android.webview.SHOW_DEV_UI"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity
android:label="WebView
Flags"
android:launchMode="singleTop"
android:name="org.chromium.android_webview.devui.FlagsActivity"
android:process=":webview_apk"
android:taskAffinity="org.chromium.android_webview.devui"
android:theme="@style/Theme.DevUi.DayNight"/>
<activity
android:enabled="false"
......@@ -1051,7 +1055,6 @@
<activity-alias
android:enabled="false"
android:exported="true"
android:icon="@drawable/icon_webview"
android:label="WebView
DevTools"
android:name="org.chromium.android_webview.devui.MonochromeLauncherActivity"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment