diff options
Diffstat (limited to 'chrome/android')
| -rw-r--r-- | chrome/android/BUILD.gn | 3 | ||||
| -rw-r--r-- | chrome/android/chrome_apk.gyp | 2 | ||||
| -rw-r--r-- | chrome/android/chrome_public_apk_tmpl.gni | 5 | ||||
| -rw-r--r-- | chrome/android/java/AndroidManifest.xml | 2 |
4 files changed, 12 insertions, 0 deletions
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index c683640..fea9523 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn @@ -60,6 +60,9 @@ android_resources("chrome_java_resources") { "//third_party/android_data_chart:android_data_chart_java_resources", "//third_party/android_media:android_media_resources", ] + if (!enable_configuration_policy) { + deps -= [ "//components/policy:app_restrictions_resources" ] + } custom_package = "org.chromium.chrome" } diff --git a/chrome/android/chrome_apk.gyp b/chrome/android/chrome_apk.gyp index 8ca6c95..f14ae7d 100644 --- a/chrome/android/chrome_apk.gyp +++ b/chrome/android/chrome_apk.gyp @@ -162,6 +162,7 @@ 'jinja_output': '<(chrome_public_apk_manifest)', 'jinja_variables': [ 'channel=<(android_channel)', + 'configuration_policy=<(configuration_policy)', 'manifest_package=<(manifest_package)', 'min_sdk_version=16', 'target_sdk_version=23', @@ -178,6 +179,7 @@ 'jinja_output': '<(chrome_sync_shell_apk_manifest)', 'jinja_variables': [ 'channel=<(android_channel)', + 'configuration_policy=<(configuration_policy)', 'manifest_package=<(sync_shell_manifest_package)', 'min_sdk_version=16', 'target_sdk_version=22', diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni index 39bcaf3..04ddc8c 100644 --- a/chrome/android/chrome_public_apk_tmpl.gni +++ b/chrome/android/chrome_public_apk_tmpl.gni @@ -30,6 +30,11 @@ default_chrome_public_jinja_variables = [ "channel=$android_channel", "enable_leakcanary=$enable_leakcanary", ] +if (enable_configuration_policy) { + default_chrome_public_jinja_variables += [ "configuration_policy=1" ] +} else { + default_chrome_public_jinja_variables += [ "configuration_policy=0" ] +} # GYP: //chrome/android/chrome_apk.gypi template("chrome_public_apk_tmpl") { diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml index 7977a28..865541d 100644 --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml @@ -115,8 +115,10 @@ by a child template that "extends" this file. {% if channel in ['dev', 'canary', 'default'] %} <meta-data android:name="com.sec.android.support.multiwindow" android:value="true" /> {% endif %} + {% if configuration_policy == '1' %} <meta-data android:name="android.content.APP_RESTRICTIONS" android:resource="@xml/app_restrictions"/> + {% endif %} <!-- Note: All activities directly or indirectly derived from ChromeActivity must specify android:hardwareAccelerated="false". |
