summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebView.java
diff options
context:
space:
mode:
authorNate Fischer <ntfschr@google.com>2017-11-08 13:39:08 -0800
committerNate Fischer <ntfschr@google.com>2017-11-08 13:39:08 -0800
commit2063508070b030966aeb4ca9c122eb003e865681 (patch)
treea4adf3506daf57c65d51da652cf823be4d1d435b /core/java/android/webkit/WebView.java
parent44aa5871a4b66f5e6452d3733013c81829e6abe9 (diff)
WebView: clarify Safe Browsing opt-in in docs
No change to logic, just docs updates. It looks like our documentation for the Safe Browsing manifest tag was poor. This clarifies that the manifest opt-in should go inside the application tag. This also updates the documentation for MetricsOptOut, since this has the same requirement. Bug: 69007974 Test: make docs (verify it looks better) Change-Id: Ieb29932f1460e3aa25c486b47692b63c0b87f509
Diffstat (limited to 'core/java/android/webkit/WebView.java')
-rw-r--r--core/java/android/webkit/WebView.java23
1 files changed, 17 insertions, 6 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 9295f5cb228a..665d694e492b 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -308,10 +308,15 @@ import java.util.Map;
* WebView may upload anonymous diagnostic data to Google when the user has consented. This data
* helps Google improve WebView. Data is collected on a per-app basis for each app which has
* instantiated a WebView. An individual app can opt out of this feature by putting the following
- * tag in its manifest:
+ * tag in its manifest's {@code <application>} element:
* <pre>
- * &lt;meta-data android:name="android.webkit.WebView.MetricsOptOut"
- * android:value="true" /&gt;
+ * &lt;manifest&gt;
+ * &lt;application&gt;
+ * ...
+ * &lt;meta-data android:name=&quot;android.webkit.WebView.MetricsOptOut&quot;
+ * android:value=&quot;true&quot; /&gt;
+ * &lt;/application&gt;
+ * &lt;/manifest&gt;
* </pre>
* <p>
* Data will only be uploaded for a given app if the user has consented AND the app has not opted
@@ -323,11 +328,17 @@ import java.util.Map;
* If Safe Browsing is enabled, WebView will block malicious URLs and present a warning UI to the
* user to allow them to navigate back safely or proceed to the malicious page.
* <p>
- * The recommended way for apps to enable the feature is putting the following tag in the manifest:
+ * The recommended way for apps to enable the feature is putting the following tag in the manifest's
+ * {@code <application>} element:
* <p>
* <pre>
- * &lt;meta-data android:name="android.webkit.WebView.EnableSafeBrowsing"
- * android:value="true" /&gt;
+ * &lt;manifest&gt;
+ * &lt;application&gt;
+ * ...
+ * &lt;meta-data android:name=&quot;android.webkit.WebView.EnableSafeBrowsing&quot;
+ * android:value=&quot;true&quot; /&gt;
+ * &lt;/application&gt;
+ * &lt;/manifest&gt;
* </pre>
*
*/