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:
@@ -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>
|
||||
* <meta-data android:name="android.webkit.WebView.EnableSafeBrowsing"
|
||||
* android:value="true" />
|
||||
* </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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user