Commit 32274831 authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

Revert "[AW][Dev-UI] always include icon resource"

This reverts commit 6d24e357.

Reason for revert: launcher icons cause problems for work profile (crbug/1148909)

Original change's description:
> [AW][Dev-UI] always include icon resource
>
> Standalone & Trichrome WebView now unconditionally includes
> LauncherActivity (defined in DeveloperUiLauncherManifest), and
> conditionally set the enabled state to true/false based on GN args
> (webview_devui_show_icon, which is configured by android_channel).
>
> This is a step toward resolving https://crbug.com/1047824, although this
> is not a complete solution since this doesn't change the monochrome
> behavior.
>
> Fixed: 1140741
> Bug: 1047824
> Test: aapt dump xmltree TrichromeWebViewGoogle.apk AndroidManifest.xml | grep -A 2 'LauncherActivity'
> Test: Same for TrichromeWebViewGoogleBeta, TrichromeWebViewGoogleStable, SystemWebViewGoogle, SystemWebView
> Test: adb shell pm enable com.google.android.webview.debug/org.chromium.android_webview.devui.LauncherActivity
> Test: adb shell pm disable com.google.android.webview.debug/org.chromium.android_webview.devui.LauncherActivity
> Change-Id: Id996965643a6fea31a34ebe39fb5b2b8ac5f5c0a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2500435
> Reviewed-by: Hazem Ashmawy <hazems@chromium.org>
> Reviewed-by: Richard Coles <torne@chromium.org>
> Commit-Queue: Richard Coles <torne@chromium.org>
> Auto-Submit: Nate Fischer <ntfschr@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#822231}

TBR=torne@chromium.org,ntfschr@chromium.org,hazems@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1047824
Bug: 1148909
Bug: b/173091361
Change-Id: Ibf176cb5daaaf27063d9f5bacc5cfb86eb49f5bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2538153
Auto-Submit: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Commit-Queue: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827414}
parent 2ea7563b
...@@ -58,17 +58,6 @@ ...@@ -58,17 +58,6 @@
android:targetActivity="org.chromium.android_webview.devui.MainActivity" android:targetActivity="org.chromium.android_webview.devui.MainActivity"
android:visibleToInstantApps="true"> android:visibleToInstantApps="true">
</activity-alias> # DIFF-ANCHOR: b7cc06e9 </activity-alias> # DIFF-ANCHOR: b7cc06e9
<activity-alias # DIFF-ANCHOR: a4f5e364
android:enabled="false"
android:exported="true"
android:label="WebView DevTools"
android:name="org.chromium.android_webview.devui.LauncherActivity"
android:targetActivity="org.chromium.android_webview.devui.MainActivity">
<intent-filter> # DIFF-ANCHOR: a5330430
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> # DIFF-ANCHOR: a5330430
</activity-alias> # DIFF-ANCHOR: a4f5e364
<meta-data android:name="$PACKAGE.WebViewLibrary" android:value="libwebviewchromium.so"/> <meta-data android:name="$PACKAGE.WebViewLibrary" android:value="libwebviewchromium.so"/>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
<meta-data android:name="org.chromium.content.browser.NUM_PRIVILEGED_SERVICES" android:value="0"/> <meta-data android:name="org.chromium.content.browser.NUM_PRIVILEGED_SERVICES" android:value="0"/>
......
...@@ -58,17 +58,6 @@ ...@@ -58,17 +58,6 @@
android:targetActivity="org.chromium.android_webview.devui.MainActivity" android:targetActivity="org.chromium.android_webview.devui.MainActivity"
android:visibleToInstantApps="true"> android:visibleToInstantApps="true">
</activity-alias> # DIFF-ANCHOR: b7cc06e9 </activity-alias> # DIFF-ANCHOR: b7cc06e9
<activity-alias # DIFF-ANCHOR: a4f5e364
android:enabled="false"
android:exported="true"
android:label="WebView DevTools"
android:name="org.chromium.android_webview.devui.LauncherActivity"
android:targetActivity="org.chromium.android_webview.devui.MainActivity">
<intent-filter> # DIFF-ANCHOR: a5330430
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> # DIFF-ANCHOR: a5330430
</activity-alias> # DIFF-ANCHOR: a4f5e364
<meta-data android:name="$PACKAGE.WebViewLibrary" android:value="libmonochrome.so"/> <meta-data android:name="$PACKAGE.WebViewLibrary" android:value="libmonochrome.so"/>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
<meta-data android:name="org.chromium.content.browser.NUM_PRIVILEGED_SERVICES" android:value="0"/> <meta-data android:name="org.chromium.content.browser.NUM_PRIVILEGED_SERVICES" android:value="0"/>
......
...@@ -161,18 +161,9 @@ android_resources("devui_resources") { ...@@ -161,18 +161,9 @@ android_resources("devui_resources") {
] ]
} }
_devui_launcher_icon_android_manifest = "$root_gen_dir/android_webview/system_webview_apk/DeveloperUiLauncherManifest.xml"
jinja_template("devui_launcher_icon_manifest") {
input = "java/DeveloperUiLauncherManifest.xml"
output = _devui_launcher_icon_android_manifest
variables = [ "show_devui_icon=$webview_devui_show_icon" ]
}
android_resources("devui_launcher_icon_resources") { android_resources("devui_launcher_icon_resources") {
sources = [] sources = []
android_manifest = _devui_launcher_icon_android_manifest android_manifest = "java/DeveloperUiLauncherManifest.xml"
android_manifest_dep = ":devui_launcher_icon_manifest"
} }
android_resources("monochrome_devui_launcher_icon_resources") { android_resources("monochrome_devui_launcher_icon_resources") {
......
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
<activity-alias android:name="org.chromium.android_webview.devui.LauncherActivity" <activity-alias android:name="org.chromium.android_webview.devui.LauncherActivity"
android:targetActivity="org.chromium.android_webview.devui.MainActivity" android:targetActivity="org.chromium.android_webview.devui.MainActivity"
android:label="WebView DevTools" android:label="WebView DevTools"
android:exported="true" android:exported="true">
android:enabled="{{ show_devui_icon|default('true') }}">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
......
...@@ -46,7 +46,6 @@ template("system_webview_apk_or_module_tmpl") { ...@@ -46,7 +46,6 @@ template("system_webview_apk_or_module_tmpl") {
deps += [ deps += [
"//android_webview:locale_pak_assets", "//android_webview:locale_pak_assets",
"//android_webview:pak_file_assets", "//android_webview:pak_file_assets",
"//android_webview/nonembedded:devui_launcher_icon_resources",
] ]
if (_exclude_weblayer_java) { if (_exclude_weblayer_java) {
...@@ -87,6 +86,10 @@ template("system_webview_apk_or_module_tmpl") { ...@@ -87,6 +86,10 @@ template("system_webview_apk_or_module_tmpl") {
alternative_android_sdk_dep = webview_framework_dep alternative_android_sdk_dep = webview_framework_dep
} }
if (webview_devui_show_icon) {
deps += [ "//android_webview/nonembedded:devui_launcher_icon_resources" ]
}
_use_trichrome_library = _use_trichrome_library =
defined(use_trichrome_library) && use_trichrome_library defined(use_trichrome_library) && use_trichrome_library
assert( assert(
......
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