Commit 4f250a0f authored by Hazem Ashmawy's avatar Hazem Ashmawy Committed by Commit Bot

[AW] DevUI: show launcher icon for DevTools for prestable channels

- Show launcher icon for Standalone WebView and Trichrome WebView
  prestable channels (dev and canary) but not for Monochrome.

- The GN flag still has to be enabled for local builds to show the icon
  since they have `android_channel=default`.

- Use a different activity-alias for Monochrome which is disabled by
  default i.e the launcher icon for monochrome is disabled by default
  and the GN arg will not show the icon for monochrome till
  crrev.com/c/2000724 is merged.

Bug: 1026062
Test: Set android_channel="dev", verify standalone WebView and TrichromeWebView show the icon
Test: Set android_channel="dev", verify Monochrome does not show the icon
Test: Set android_channel="default", verify no WebView icons show up
Change-Id: Icd218fac086aa940bca61f2ac6ef3ceea76cf0db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1993817Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Commit-Queue: Hazem Ashmawy <hazems@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733563}
parent 6f5fd00a
......@@ -124,6 +124,12 @@ android_resources("devui_launcher_icon_resources") {
android_manifest = "java/DeveloperUiLauncherManifest.xml"
}
android_resources("monochrome_devui_launcher_icon_resources") {
resource_dirs = []
android_manifest = "java/MonochromeDeveloperUiLauncherManifest.xml"
custom_package = "org.chromium.android_webview.devui.icon"
}
jinja_template("system_webview_manifest") {
input = "java/AndroidManifest.xml"
output = system_webview_android_manifest
......
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2020 The Chromium Authors. All rights reserved. Use of this
source code is governed by a BSD-style license that can be found in the
LICENSE file.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.chromium.android_webview.devui">
<!-- This should only be merged to Monochrome manifest -->
<!--suppress HardcodedText -->
<application>
<activity-alias android:name="org.chromium.android_webview.devui.MonochromeLauncherActivity"
android:targetActivity="org.chromium.android_webview.devui.MainActivity"
android:label="WebView DevTools"
android:exported="true"
android:enabled="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity-alias>
</application>
</manifest>
......@@ -2,11 +2,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chrome/android/channel.gni")
import("//weblayer/variables.gni")
declare_args() {
# Show a launcher icon to open WebView developer UI, off by default.
webview_devui_show_icon = false
# Show a launcher icon to open WebView developer UI, enabled by default for dev and canary
# channels. The icon for Monochrome is always hidden by default (https://crbug.com/1026062)
# TODO(https://crbug.com/1002589): add beta channel when approved
webview_devui_show_icon =
android_channel == "canary" || android_channel == "dev"
}
system_webview_android_manifest =
......
......@@ -419,8 +419,7 @@ template("monochrome_public_common_apk_or_module_tmpl") {
]
if (webview_devui_show_icon) {
_deps +=
[ "//android_webview/nonembedded:devui_launcher_icon_resources" ]
_deps += [ "//android_webview/nonembedded:monochrome_devui_launcher_icon_resources" ]
}
if (_include_primary_support) {
......
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