-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathautomotive.patch
161 lines (154 loc) · 8.18 KB
/
automotive.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
diff --git a/.gitignore b/.gitignore
index 905603052380..4686f49a9bc6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -329,3 +329,4 @@ third_party/rust/target/
# Buckup files that are generated by //tools/metrics/histograms/pretty_print.py in presubmit.
/*.before.pretty-print.xml
+build/*
\ No newline at end of file
diff --git a/DEPS b/DEPS
index 6bca380461c4..2a7f8659842b 100644
--- a/DEPS
+++ b/DEPS
@@ -149,7 +149,7 @@ vars = {
'checkout_clang_coverage_tools': False,
# Fetch the pgo profiles to optimize official builds.
- 'checkout_pgo_profiles': False,
+ 'checkout_pgo_profiles': True,
# Fetch clang-tidy into the same bin/ directory as our clang binary.
'checkout_clang_tidy': False,
diff --git a/android_webview/expectations/system_webview_32_64_bundle.AndroidManifest.expected b/android_webview/expectations/system_webview_32_64_bundle.AndroidManifest.expected
index db71bbe82ef6..4ffb138c93e1 100644
--- a/android_webview/expectations/system_webview_32_64_bundle.AndroidManifest.expected
+++ b/android_webview/expectations/system_webview_32_64_bundle.AndroidManifest.expected
@@ -27,6 +27,9 @@
android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:exported="false"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
+ <meta-data
+ android:name="distractionOptimized"
+ android:value="true"/>
</activity> # DIFF-ANCHOR: ea1a94af
<activity # DIFF-ANCHOR: a4438884
android:name="org.chromium.android_webview.devui.MainActivity"
@@ -69,6 +72,9 @@
android:targetActivity="org.chromium.android_webview.devui.MainActivity"
android:visibleToInstantApps="true">
</activity-alias> # DIFF-ANCHOR: b7cc06e9
+ <meta-data
+ android:name="distractionOptimized"
+ android:value="true"/>
<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="org.chromium.content.browser.NUM_PRIVILEGED_SERVICES" android:value="0"/>
diff --git a/android_webview/expectations/system_webview_64_bundle.AndroidManifest.expected b/android_webview/expectations/system_webview_64_bundle.AndroidManifest.expected
index bb7656558f7b..ff89d8a66778 100644
--- a/android_webview/expectations/system_webview_64_bundle.AndroidManifest.expected
+++ b/android_webview/expectations/system_webview_64_bundle.AndroidManifest.expected
@@ -68,6 +68,9 @@
android:targetActivity="org.chromium.android_webview.devui.MainActivity"
android:visibleToInstantApps="true">
</activity-alias> # DIFF-ANCHOR: b7cc06e9
+ <meta-data
+ android:name="distractionOptimized"
+ android:value="true"/>
<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="org.chromium.content.browser.NUM_PRIVILEGED_SERVICES" android:value="0"/>
diff --git a/android_webview/nonembedded/java/AndroidManifest.xml b/android_webview/nonembedded/java/AndroidManifest.xml
index f40885a3354b..eafb0dee8092 100644
--- a/android_webview/nonembedded/java/AndroidManifest.xml
+++ b/android_webview/nonembedded/java/AndroidManifest.xml
@@ -22,6 +22,9 @@ by a child template that "extends" this file.
android:required="false" />
<uses-feature android:name="android.software.leanback"
android:required="false" />
+ <uses-feature
+ android:name="android.hardware.type.automotive"
+ android:required="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
@@ -44,6 +47,7 @@ by a child template that "extends" this file.
android:extractNativeLibs="false">
{# This part is shared between stand-alone WebView and Monochrome #}
{% macro common(manifest_package, webview_lib) %}
+
<meta-data android:name="com.android.webview.WebViewLibrary"
android:value="{{ webview_lib }}" />
<!-- Service used to hold androidx.webkit startup feature metadata
@@ -56,6 +60,7 @@ by a child template that "extends" this file.
<meta-data
android:name="STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX"
android:value="true"/>
+
<meta-data
android:name="STARTUP_FEATURE_SET_DIRECTORY_BASE_PATH"
android:value="true"/>
@@ -73,10 +78,12 @@ by a child template that "extends" this file.
android:taskAffinity="{{ manifest_package }}.org.chromium.android_webview.devui" {# Explicit taskAffinity to distinguish from monochrome browser task. #}
android:process=":webview_apk" {# Explicit process required for monochrome compatibility. #}
android:exported="true">
+
<intent-filter>
<action android:name="com.android.webview.SHOW_DEV_UI" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
+
</activity>
<!-- Don't actually try to launch with this alias: it only exists so we can query its enabled state. -->
<!-- If you change this component make sure to update the corresponding copy in
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
index 0635acb3c2ff..b963d706b439 100644
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -158,7 +158,9 @@ by a child template that "extends" this file.
all applications and needs to be disabled manually.
-->
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
-
+ <uses-feature
+ android:name="android.hardware.type.automotive"
+ android:required="true" />
{% block extra_keyset_definitions %}
{% endblock %}
@@ -515,6 +517,9 @@ by a child template that "extends" this file.
android:hardwareAccelerated="false"
{% endblock %}
>
+ <meta-data
+ android:name="distractionOptimized"
+ android:value="true"/>
<meta-data
android:name="android.activity.launch_mode"
android:value="singleInstancePerTask"/>
@@ -556,6 +561,9 @@ by a child template that "extends" this file.
android:resource="@xml/launchershortcuts" />
{{ self.supports_vr() }}
{{ self.extra_web_rendering_activity_definitions() }}
+ <meta-data
+ android:name="distractionOptimized"
+ android:value="true"/>
</activity-alias>
<activity android:name="org.chromium.chrome.browser.ChromeTabbedActivity2"
android:theme="@style/Theme.Chromium.TabbedMode"
@@ -1251,7 +1259,6 @@ by a child template that "extends" this file.
{% endfor %}
<meta-data android:name="android.allow_multiple_resumed_activities" android:value="true" />
-
<!-- Samsung MultiWindow Support -->
<meta-data android:name="com.samsung.android.sdk.multiwindow.enable"
android:value="true" />
diff --git a/chrome/android/java/AndroidManifest_trichrome_library.xml b/chrome/android/java/AndroidManifest_trichrome_library.xml
index 928b193b9101..6f98f56044d5 100644
--- a/chrome/android/java/AndroidManifest_trichrome_library.xml
+++ b/chrome/android/java/AndroidManifest_trichrome_library.xml
@@ -17,6 +17,9 @@ Note: This is a jinja2 template, processed at build time into the final manifest
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.software.leanback" android:required="false" />
+ <uses-feature
+ android:name="android.hardware.type.automotive"
+ android:required="true" />
<!-- TODO(torne): we should specify an icon, roundIcon, and label from resources. -->
<application