diff options
| author | Nate Fischer <ntfschr@google.com> | 2018-01-18 12:01:19 -0800 |
|---|---|---|
| committer | Nate Fischer <ntfschr@google.com> | 2018-01-18 12:01:19 -0800 |
| commit | fb92ee13486acab7acbd68a0f17024af065590a3 (patch) | |
| tree | da8a7b24c4bd7314a4c58b405a7f810099a12fc2 /core/java/android/webkit/WebView.java | |
| parent | 6db6679a1a365fab545e9be5964645fafeb9a25d (diff) | |
WebView: document Safe Browsing as 'on' by default
WebView Safe Browsing will be on by default. While previously it was
opt-in (applications needed to enable via manifest or API), now it is an
opt-out feature.
This CL updates documentation to mention that the feature is on by
default and provides steps for applications to opt-out if necessary.
This also makes the case of "Safe Browsing" consistent across
documentation.
Bug: 69579509
Test: make docs (manually verify)
Change-Id: I77683a684cd79d2e3cd313ddbff8c52fe510b72b
Diffstat (limited to 'core/java/android/webkit/WebView.java')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index deb94e816a69..6bec2e699904 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> * <manifest> * <application> * ... * <meta-data android:name="android.webkit.WebView.EnableSafeBrowsing" - * android:value="true" /> + * android:value="false" /> * </application> * </manifest> * </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 @@ -1666,9 +1669,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). |
