Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9a23531 authored by Nate Fischer's avatar Nate Fischer
Browse files

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
parent abdaf5b5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -52106,6 +52106,7 @@ package android.webkit {
    field public static final int ERROR_UNSAFE_RESOURCE = -16; // 0xfffffff0
    field public static final int ERROR_UNSUPPORTED_AUTH_SCHEME = -3; // 0xfffffffd
    field public static final int ERROR_UNSUPPORTED_SCHEME = -10; // 0xfffffff6
    field public static final int SAFE_BROWSING_THREAT_BILLING = 4; // 0x4
    field public static final int SAFE_BROWSING_THREAT_MALWARE = 1; // 0x1
    field public static final int SAFE_BROWSING_THREAT_PHISHING = 2; // 0x2
    field public static final int SAFE_BROWSING_THREAT_UNKNOWN = 0; // 0x0
+14 −5
Original line number Diff line number Diff line
@@ -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