Register now for Android Dev Summit 2019!

SafeBrowsingResponseCompat

public abstract class SafeBrowsingResponseCompat
extends Object

java.lang.Object
   ↳ androidx.webkit.SafeBrowsingResponseCompat


Compatibility version of SafeBrowsingResponse.

Summary

Public methods

abstract void backToSafety(boolean report)

Act as if the user clicked the "back to safety" button.

abstract void proceed(boolean report)

Act as if the user clicked the "visit this unsafe site" button.

abstract void showInterstitial(boolean allowReporting)

Display the default interstitial.

Inherited methods

Public methods

backToSafety

public abstract void backToSafety (boolean report)

Act as if the user clicked the "back to safety" button.

This method should only be called if WebViewFeature.isFeatureSupported(String) returns true for WebViewFeature.SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY.

Parameters
report boolean: true to enable Safe Browsing reporting.

proceed

public abstract void proceed (boolean report)

Act as if the user clicked the "visit this unsafe site" button.

This method should only be called if WebViewFeature.isFeatureSupported(String) returns true for WebViewFeature.SAFE_BROWSING_RESPONSE_PROCEED.

Parameters
report boolean: true to enable Safe Browsing reporting.

showInterstitial

public abstract void showInterstitial (boolean allowReporting)

Display the default interstitial.

This method should only be called if WebViewFeature.isFeatureSupported(String) returns true for WebViewFeature.SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL.

Parameters
allowReporting boolean: true if the interstitial should show a reporting checkbox.