From aa6c899803ee44a943e6401128f985955125fd44 Mon Sep 17 00:00:00 2001 From: Tim Volodine Date: Fri, 8 Feb 2019 18:30:16 +0000 Subject: [Browser2] Sync from chromium code, including increase target_sdk version to 28 (P) and enable cleartext traffic Update Browser2 to match the SystemWebViewShell code in the chromium tree. Update Browser2 to target Android P (API level 28). This is a part of the general effort to update apps to API level 28, see crbug.com/898190 and b/115499280. This patch also ensures that cleartextTrafficPermitted is set to true to ensure backwards compatibility for the Browser2 app (and to allow cleartext traffic, e.g. using unencrypted http protocol). This patch also updates trust-anchors to include system and user certificates. Bug: 119501137 Test: manual Change-Id: I17a3989a5a39e57f3dff4d63a8722bd846d0fe47 --- AndroidManifest.xml | 61 ++++- res/drawable-mdpi/breadcrumb_arrow_black.png | Bin 0 -> 295 bytes res/drawable-mdpi/ic_launcher.png | Bin 0 -> 9397 bytes res/drawable-mdpi/item_more_black.png | Bin 0 -> 325 bytes res/layout/activity_empty.xml | 12 + res/layout/activity_webview_animation_test.xml | 65 +++++ res/layout/activity_webview_browser.xml | 14 +- res/menu/main_menu.xml | 9 + res/values/strings.xml | 15 ++ res/xml/network_security_config.xml | 17 ++ src/org/chromium/webview_shell/JankActivity.java | 1 + .../chromium/webview_shell/TelemetryActivity.java | 51 +++- .../TelemetryMemoryPressureActivity.java | 9 +- .../WebViewAnimationTestActivity.java | 157 +++++++++++ .../webview_shell/WebViewBrowserActivity.java | 295 ++++++++++++++++++--- 15 files changed, 639 insertions(+), 67 deletions(-) create mode 100644 res/drawable-mdpi/breadcrumb_arrow_black.png create mode 100644 res/drawable-mdpi/ic_launcher.png create mode 100644 res/drawable-mdpi/item_more_black.png create mode 100644 res/layout/activity_empty.xml create mode 100644 res/layout/activity_webview_animation_test.xml create mode 100644 res/xml/network_security_config.xml create mode 100644 src/org/chromium/webview_shell/WebViewAnimationTestActivity.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 95b33ed..4376adc 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -10,7 +10,7 @@ android:versionCode="1" android:versionName="1.0" > - + @@ -31,35 +31,47 @@ + android:theme="@android:style/Theme.Light" + android:networkSecurityConfig="@xml/network_security_config" + android:debuggable="true" > + + + + android:windowSoftInputMode="adjustResize" + android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|density"> @@ -85,5 +97,38 @@ + + + + + + + + + + + + + + + + diff --git a/res/drawable-mdpi/breadcrumb_arrow_black.png b/res/drawable-mdpi/breadcrumb_arrow_black.png new file mode 100644 index 0000000..7b9ff79 Binary files /dev/null and b/res/drawable-mdpi/breadcrumb_arrow_black.png differ diff --git a/res/drawable-mdpi/ic_launcher.png b/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000..96a442e Binary files /dev/null and b/res/drawable-mdpi/ic_launcher.png differ diff --git a/res/drawable-mdpi/item_more_black.png b/res/drawable-mdpi/item_more_black.png new file mode 100644 index 0000000..b984062 Binary files /dev/null and b/res/drawable-mdpi/item_more_black.png differ diff --git a/res/layout/activity_empty.xml b/res/layout/activity_empty.xml new file mode 100644 index 0000000..868453d --- /dev/null +++ b/res/layout/activity_empty.xml @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/res/layout/activity_webview_animation_test.xml b/res/layout/activity_webview_animation_test.xml new file mode 100644 index 0000000..44cf7c0 --- /dev/null +++ b/res/layout/activity_webview_animation_test.xml @@ -0,0 +1,65 @@ + + + + + +