summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/api/current.txt2
-rw-r--r--core/java/android/webkit/WebView.java7
-rw-r--r--core/java/android/webkit/flags.aconfig8
3 files changed, 16 insertions, 1 deletions
diff --git a/core/api/current.txt b/core/api/current.txt
index b053c4a0f895..b00c8985eeac 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -58545,7 +58545,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();
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index ffe8c80023c4..b6663992b851 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -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);
diff --git a/core/java/android/webkit/flags.aconfig b/core/java/android/webkit/flags.aconfig
index b2f1c9af251d..c9e94d2f57f6 100644
--- a/core/java/android/webkit/flags.aconfig
+++ b/core/java/android/webkit/flags.aconfig
@@ -11,6 +11,14 @@ flag {
}
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
namespace: "webview"