Merge "Add an API to enable disable safebrowsing in WebView" into oc-dev am: c922c4827a

am: e7534f48ce

Change-Id: I8c01b72d5f593070eebbac1f5271ca166e6abf7b
This commit is contained in:
Selim Gurun
2017-04-10 16:56:06 +00:00
committed by android-build-merger
4 changed files with 36 additions and 0 deletions

View File

@@ -1385,6 +1385,36 @@ public abstract class WebSettings {
*/
public abstract boolean getOffscreenPreRaster();
/**
* Sets whether Safe Browsing is enabled. Safe browsing allows WebView to
* protect against malware and phishing attacks by verifying the links.
*
* 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.
* <p>
* <pre>
* &lt;meta-data android:name="android.webkit.WebView.EnableSafeBrowsing"
* android:value="true" /&gt;
* </pre>
* </p>
*
* This API overrides the manifest tag value for this WebView.
*
* @param enabled Whether Safe browsing is enabled.
*/
public abstract void setSafeBrowsingEnabled(boolean enabled);
/**
* Gets whether Safe browsing is enabled.
* See {@link #setSafeBrowsingEnabled}.
*
* @return true if Safe browsing is enabled and false otherwise.
*/
public abstract boolean getSafeBrowsingEnabled();
/**
* @hide
*/