summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebViewClient.java
diff options
context:
space:
mode:
authorNate Fischer <ntfschr@google.com>2018-10-17 20:30:54 -0700
committerNate Fischer <ntfschr@google.com>2018-10-17 20:30:54 -0700
commitf9a235316c1de8cdab1ec9bf1b4e4b52b27e6576 (patch)
tree094cff67ed3cecff8e74388e09221192ed1e3a5a /core/java/android/webkit/WebViewClient.java
parentabdaf5b51f798a4d9a1bae7b515df6ae40c2d591 (diff)
WebView: add new integer for billing threats
No change to logic, this adds a new integer constant for Safe Browsing billing threats. This also adds ending periods in the docs for existing threat types. Bug: 117470538 Test: N/A Change-Id: I5368601efc7d587af1f530b7bf2825f277424082
Diffstat (limited to 'core/java/android/webkit/WebViewClient.java')
-rw-r--r--core/java/android/webkit/WebViewClient.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/core/java/android/webkit/WebViewClient.java b/core/java/android/webkit/WebViewClient.java
index bdd7a0900213..69d7202c4da8 100644
--- a/core/java/android/webkit/WebViewClient.java
+++ b/core/java/android/webkit/WebViewClient.java
@@ -282,19 +282,28 @@ public class WebViewClient {
SAFE_BROWSING_THREAT_UNKNOWN,
SAFE_BROWSING_THREAT_MALWARE,
SAFE_BROWSING_THREAT_PHISHING,
- SAFE_BROWSING_THREAT_UNWANTED_SOFTWARE
+ SAFE_BROWSING_THREAT_UNWANTED_SOFTWARE,
+ SAFE_BROWSING_THREAT_BILLING,
})
@Retention(RetentionPolicy.SOURCE)
public @interface SafeBrowsingThreat {}
- /** The resource was blocked for an unknown reason */
+ /** 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 */
+ /** The resource was blocked because it contains malware. */
public static final int SAFE_BROWSING_THREAT_MALWARE = 1;
- /** The resource was blocked because it contains deceptive content */
+ /** The resource was blocked because it contains deceptive content. */
public static final int SAFE_BROWSING_THREAT_PHISHING = 2;
- /** The resource was blocked because it contains unwanted software */
+ /** The resource was blocked because it contains unwanted software. */
public static final int SAFE_BROWSING_THREAT_UNWANTED_SOFTWARE = 3;
+ /**
+ * The resource was blocked because it may trick the user into a billing agreement.
+ *
+ * <p>This constant is only used when targetSdkVersion is greater than {@link
+ * android.os.Build.VERSION_CODES#Q}. Otherwise, {@link #SAFE_BROWSING_THREAT_UNKNOWN} is used
+ * instead.
+ */
+ public static final int SAFE_BROWSING_THREAT_BILLING = 4;
/**
* Report an error to the host application. These errors are unrecoverable