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

Commit ed1bf52d authored by Aashna Jena's avatar Aashna Jena
Browse files

Deprecate WebView.startSafeBrowsing API

Flag: android.webkit.deprecate_start_safe_browsing
Bug: 372193372

Change-Id: I06c0ffe2fa27b5afa94456b74676c2faadd27d99
parent 4e1317ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -58512,7 +58512,7 @@ package android.webkit {
    method public void setWebViewRenderProcessClient(@Nullable android.webkit.WebViewRenderProcessClient);
    method @Deprecated public boolean shouldDelayChildPressedState();
    method @Deprecated public boolean showFindDialog(@Nullable String, boolean);
    method public static void startSafeBrowsing(@NonNull android.content.Context, @Nullable android.webkit.ValueCallback<java.lang.Boolean>);
    method @Deprecated @FlaggedApi("android.webkit.deprecate_start_safe_browsing") public static void startSafeBrowsing(@NonNull android.content.Context, @Nullable android.webkit.ValueCallback<java.lang.Boolean>);
    method public void stopLoading();
    method public void zoomBy(float);
    method public boolean zoomIn();
+7 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.webkit;

import android.annotation.CallbackExecutor;
import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -1495,7 +1496,13 @@ public class WebView extends AbsoluteLayout
     * @param context Application Context.
     * @param callback will be called on the UI thread with {@code true} if initialization is
     * successful, {@code false} otherwise.
     * @deprecated In WebView version 122.0.6174.0 and later, this initialization is done
     * automatically, so there is no need to call this API. If called, this API will invoke
     * the {@code callback} immediately with {@code true}, given that Safe Browsing
     * is enabled and supported on the device.
     */
    @Deprecated
    @FlaggedApi(android.webkit.Flags.FLAG_DEPRECATE_START_SAFE_BROWSING)
    public static void startSafeBrowsing(@NonNull Context context,
            @Nullable ValueCallback<Boolean> callback) {
        getFactory().getStatics().initSafeBrowsing(context, callback);
+8 −0
Original line number Diff line number Diff line
@@ -10,6 +10,14 @@ flag {
    is_fixed_read_only: true
}

flag {
    name: "deprecate_start_safe_browsing"
    is_exported: true
    namespace: "webview"
    description: "Deprecating startSafeBrowsing API because it is a NOOP"
    bug: "372193372"
}

flag {
    name: "mainline_apis"
    is_exported: true