Loading core/java/android/webkit/WebViewClient.java +16 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.webkit; import android.annotation.IntDef; import android.graphics.Bitmap; import android.net.http.SslError; import android.os.Message; Loading @@ -23,6 +24,9 @@ import android.view.InputEvent; import android.view.KeyEvent; import android.view.ViewRootImpl; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; public class WebViewClient { /** Loading Loading @@ -237,6 +241,16 @@ public class WebViewClient { /** Resource load was cancelled by Safe Browsing */ public static final int ERROR_UNSAFE_RESOURCE = -16; /** @hide */ @IntDef({ SAFE_BROWSING_THREAT_UNKNOWN, SAFE_BROWSING_THREAT_MALWARE, SAFE_BROWSING_THREAT_PHISHING, SAFE_BROWSING_THREAT_UNWANTED_SOFTWARE }) @Retention(RetentionPolicy.SOURCE) public @interface SafeBrowsingThreat {} /** The resource was blocked for an unknown reason */ public static final int SAFE_BROWSING_THREAT_UNKNOWN = 0; /** The resource was blocked because it contains malware */ Loading Loading @@ -521,8 +535,8 @@ public class WebViewClient { * SAFE_BROWSING_THREAT_* value. * @param callback Applications must invoke one of the callback methods. */ public void onSafeBrowsingHit(WebView view, WebResourceRequest request, int threatType, SafeBrowsingResponse callback) { public void onSafeBrowsingHit(WebView view, WebResourceRequest request, @SafeBrowsingThreat int threatType, SafeBrowsingResponse callback) { callback.showInterstitial(/* allowReporting */ true); } } Loading
core/java/android/webkit/WebViewClient.java +16 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.webkit; import android.annotation.IntDef; import android.graphics.Bitmap; import android.net.http.SslError; import android.os.Message; Loading @@ -23,6 +24,9 @@ import android.view.InputEvent; import android.view.KeyEvent; import android.view.ViewRootImpl; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; public class WebViewClient { /** Loading Loading @@ -237,6 +241,16 @@ public class WebViewClient { /** Resource load was cancelled by Safe Browsing */ public static final int ERROR_UNSAFE_RESOURCE = -16; /** @hide */ @IntDef({ SAFE_BROWSING_THREAT_UNKNOWN, SAFE_BROWSING_THREAT_MALWARE, SAFE_BROWSING_THREAT_PHISHING, SAFE_BROWSING_THREAT_UNWANTED_SOFTWARE }) @Retention(RetentionPolicy.SOURCE) public @interface SafeBrowsingThreat {} /** The resource was blocked for an unknown reason */ public static final int SAFE_BROWSING_THREAT_UNKNOWN = 0; /** The resource was blocked because it contains malware */ Loading Loading @@ -521,8 +535,8 @@ public class WebViewClient { * SAFE_BROWSING_THREAT_* value. * @param callback Applications must invoke one of the callback methods. */ public void onSafeBrowsingHit(WebView view, WebResourceRequest request, int threatType, SafeBrowsingResponse callback) { public void onSafeBrowsingHit(WebView view, WebResourceRequest request, @SafeBrowsingThreat int threatType, SafeBrowsingResponse callback) { callback.showInterstitial(/* allowReporting */ true); } }