summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebView.java
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2018-01-25 16:00:00 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-01-25 16:00:00 +0000
commit04d0d0031a50c601f9b12686cf7eb2c90a2ab840 (patch)
tree7d4905395e651c1c5903a2b921596679d4cc3c58 /core/java/android/webkit/WebView.java
parent20b9219edafdd82358a8bfd86bbec46327627bc6 (diff)
parentfb92ee13486acab7acbd68a0f17024af065590a3 (diff)
Merge "WebView: document Safe Browsing as 'on' by default"
Diffstat (limited to 'core/java/android/webkit/WebView.java')
-rw-r--r--core/java/android/webkit/WebView.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 2c51ee940039..d2cb70e027c1 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -327,22 +327,25 @@ import java.util.Map;
* <h3>Safe Browsing</h3>
*
* <p>
- * 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.
+ * With Safe Browsing, 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's
- * {@code <application>} element:
+ * Safe Browsing is enabled by default on devices which support it. If your app needs to disable
+ * Safe Browsing for all WebViews, it can do so in the manifest's {@code <application>} element:
* <p>
* <pre>
* &lt;manifest&gt;
* &lt;application&gt;
* ...
* &lt;meta-data android:name=&quot;android.webkit.WebView.EnableSafeBrowsing&quot;
- * android:value=&quot;true&quot; /&gt;
+ * android:value=&quot;false&quot; /&gt;
* &lt;/application&gt;
* &lt;/manifest&gt;
* </pre>
*
+ * <p>
+ * Otherwise, see {@link WebSettings#setSafeBrowsingEnabled}.
+ *
*/
// Implementation notes.
// The WebView is a thin API class that delegates its public API to a backend WebViewProvider
@@ -1670,9 +1673,8 @@ public class WebView extends AbsoluteLayout
* invoked with {@code true}. Safe Browsing is not fully supported on all devices. For those
* devices {@code callback} will receive {@code false}.
* <p>
- * This does not enable the Safe Browsing feature itself, and should only be called if Safe
- * Browsing is enabled by the manifest tag or {@link WebSettings#setSafeBrowsingEnabled}. This
- * prepares resources used for Safe Browsing.
+ * This should not be called if Safe Browsing has been disabled by manifest tag or {@link
+ * WebSettings#setSafeBrowsingEnabled}. This prepares resources used for Safe Browsing.
* <p>
* This should be called with the Application Context (and will always use the Application
* context to do its work regardless).