Loading core/java/android/webkit/WebSettings.java +8 −8 Original line number Diff line number Diff line Loading @@ -1394,26 +1394,26 @@ public abstract class WebSettings { /** * Sets whether Safe Browsing is enabled. Safe browsing allows WebView to * Sets whether Safe Browsing is enabled. Safe Browsing allows WebView to * protect against malware and phishing attacks by verifying the links. * * <p> * Safe browsing is disabled by default. The recommended way to enable Safe browsing is using a * manifest tag to change the default value to enabled for all WebViews (read <a * href="{@docRoot}reference/android/webkit/WebView.html">general Safe Browsing info</a>). * Safe Browsing can be disabled for all WebViews using a manifest tag (read <a * href="{@docRoot}reference/android/webkit/WebView.html">general Safe Browsing info</a>). The * manifest tag has a lower precedence than this API. * * <p> * This API overrides the manifest tag value for this WebView. * Safe Browsing is enabled by default for devices which support it. * * @param enabled Whether Safe browsing is enabled. * @param enabled Whether Safe Browsing is enabled. */ public abstract void setSafeBrowsingEnabled(boolean enabled); /** * Gets whether Safe browsing is enabled. * Gets whether Safe Browsing is enabled. * See {@link #setSafeBrowsingEnabled}. * * @return {@code true} if Safe browsing is enabled and {@code false} otherwise. * @return {@code true} if Safe Browsing is enabled and {@code false} otherwise. */ public abstract boolean getSafeBrowsingEnabled(); Loading core/java/android/webkit/WebView.java +10 −8 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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). Loading Loading
core/java/android/webkit/WebSettings.java +8 −8 Original line number Diff line number Diff line Loading @@ -1394,26 +1394,26 @@ public abstract class WebSettings { /** * Sets whether Safe Browsing is enabled. Safe browsing allows WebView to * Sets whether Safe Browsing is enabled. Safe Browsing allows WebView to * protect against malware and phishing attacks by verifying the links. * * <p> * Safe browsing is disabled by default. The recommended way to enable Safe browsing is using a * manifest tag to change the default value to enabled for all WebViews (read <a * href="{@docRoot}reference/android/webkit/WebView.html">general Safe Browsing info</a>). * Safe Browsing can be disabled for all WebViews using a manifest tag (read <a * href="{@docRoot}reference/android/webkit/WebView.html">general Safe Browsing info</a>). The * manifest tag has a lower precedence than this API. * * <p> * This API overrides the manifest tag value for this WebView. * Safe Browsing is enabled by default for devices which support it. * * @param enabled Whether Safe browsing is enabled. * @param enabled Whether Safe Browsing is enabled. */ public abstract void setSafeBrowsingEnabled(boolean enabled); /** * Gets whether Safe browsing is enabled. * Gets whether Safe Browsing is enabled. * See {@link #setSafeBrowsingEnabled}. * * @return {@code true} if Safe browsing is enabled and {@code false} otherwise. * @return {@code true} if Safe Browsing is enabled and {@code false} otherwise. */ public abstract boolean getSafeBrowsingEnabled(); Loading
core/java/android/webkit/WebView.java +10 −8 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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). Loading