summaryrefslogtreecommitdiffstats
path: root/android_webview/apk
diff options
context:
space:
mode:
authormnaganov <mnaganov@chromium.org>2015-01-19 10:31:42 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-19 18:32:43 +0000
commit8d4fbd88af6461eed50ea0c6b49654c6933a3b0d (patch)
treefca234d58dfac2cfb36c5b697077c6ede2cba12f /android_webview/apk
parent6a32cbeec354e1ca434def1818fcb18608c5be2d (diff)
downloadchromium_src-8d4fbd88af6461eed50ea0c6b49654c6933a3b0d.zip
chromium_src-8d4fbd88af6461eed50ea0c6b49654c6933a3b0d.tar.gz
chromium_src-8d4fbd88af6461eed50ea0c6b49654c6933a3b0d.tar.bz2
[Android WebView] Provide an activity for displaying OSS licenses
The activity is invoked using android.settings.WEBVIEW_LICENSE intent. Current implementation invokes system HtmlViewer passing it a content URI, and implements a content provider for serving it. The licenses file is stored inside the APK compressed, thus requiring extraction into a temporary folder prior to serving. The second attempt to land this. Unlike the previous one, does not terminate project files generation and compilation if there are license problems with third-party dirs (see the comment in webview_licenses.py). BUG=448703 Review URL: https://codereview.chromium.org/860693002 Cr-Commit-Position: refs/heads/master@{#312135}
Diffstat (limited to 'android_webview/apk')
-rw-r--r--android_webview/apk/java/AndroidManifest.xml13
-rw-r--r--android_webview/apk/system_webview_apk_common.gypi21
2 files changed, 34 insertions, 0 deletions
diff --git a/android_webview/apk/java/AndroidManifest.xml b/android_webview/apk/java/AndroidManifest.xml
index af0ce98..76d14a3 100644
--- a/android_webview/apk/java/AndroidManifest.xml
+++ b/android_webview/apk/java/AndroidManifest.xml
@@ -19,5 +19,18 @@
<application android:label="Android System WebView"
android:icon="@drawable/icon_webview"
android:multiArch="true">
+ <activity android:name="com.android.webview.chromium.LicenseActivity"
+ android:label="@string/license_activity_title"
+ >
+ <intent-filter>
+ <action android:name="android.settings.WEBVIEW_LICENSE" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
+ </activity>
+ <provider android:name="com.android.webview.chromium.LicenseContentProvider"
+ android:exported="true"
+ android:authorities="com.android.webview.chromium.LicenseContentProvider" />
</application>
</manifest>
diff --git a/android_webview/apk/system_webview_apk_common.gypi b/android_webview/apk/system_webview_apk_common.gypi
index 2b24785..dae95ac 100644
--- a/android_webview/apk/system_webview_apk_common.gypi
+++ b/android_webview/apk/system_webview_apk_common.gypi
@@ -25,6 +25,7 @@
'additional_input_paths': [
'<(asset_location)/webviewchromium.pak',
'<(asset_location)/en-US.pak',
+ '<(asset_location)/webview_licenses.notice',
],
'conditions': [
['icu_use_data_file_flag==1', {
@@ -62,5 +63,25 @@
],
},
],
+ 'actions': [
+ {
+ 'action_name': 'generate_webview_license_notice',
+ 'inputs': [
+ '<!@(python <(DEPTH)/android_webview/tools/webview_licenses.py notice_deps)',
+ '<(DEPTH)/android_webview/tools/licenses_notice.tmpl',
+ '<(DEPTH)/android_webview/tools/webview_licenses.py',
+ ],
+ 'outputs': [
+ '<(asset_location)/webview_licenses.notice',
+ ],
+ 'action': [
+ 'python',
+ '<(DEPTH)/android_webview/tools/webview_licenses.py',
+ 'notice',
+ '<(asset_location)/webview_licenses.notice',
+ ],
+ 'message': 'Generating WebView license notice',
+ },
+ ],
'includes': [ '../../build/java_apk.gypi' ],
}