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

Commit 24b50720 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "WebViewUpdateManager API feedback." into main

parents 5cc0ba49 b8ca68cb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -652,6 +652,7 @@ package android.webkit {
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.webkit.WebViewProviderResponse> CREATOR;
    field public static final int STATUS_FAILED_LISTING_WEBVIEW_PACKAGES = 4; // 0x4
    field public static final int STATUS_FAILED_OTHER = 11; // 0xb
    field public static final int STATUS_FAILED_WAITING_FOR_RELRO = 3; // 0x3
    field public static final int STATUS_SUCCESS = 0; // 0x0
    field @Nullable public final android.content.pm.PackageInfo packageInfo;
+3 −0
Original line number Diff line number Diff line
@@ -94,6 +94,9 @@ public final class WebViewFactory {
    // error for namespace lookup
    public static final int LIBLOAD_FAILED_TO_FIND_NAMESPACE = 10;

    // generic error for future use
    static final int LIBLOAD_FAILED_OTHER = 11;

    /**
     * Stores the timestamps at which various WebView startup events occurred in this process.
     */
+2 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ public final class WebViewProviderResponse implements Parcelable {
                STATUS_SUCCESS,
                STATUS_FAILED_WAITING_FOR_RELRO,
                STATUS_FAILED_LISTING_WEBVIEW_PACKAGES,
                STATUS_FAILED_OTHER,
            })
    @Retention(RetentionPolicy.SOURCE)
    private @interface WebViewProviderStatus {}
@@ -49,6 +50,7 @@ public final class WebViewProviderResponse implements Parcelable {
            WebViewFactory.LIBLOAD_FAILED_WAITING_FOR_RELRO;
    public static final int STATUS_FAILED_LISTING_WEBVIEW_PACKAGES =
            WebViewFactory.LIBLOAD_FAILED_LISTING_WEBVIEW_PACKAGES;
    public static final int STATUS_FAILED_OTHER = WebViewFactory.LIBLOAD_FAILED_OTHER;

    public WebViewProviderResponse(
            @Nullable PackageInfo packageInfo, @WebViewProviderStatus int status) {
+2 −2
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ public final class WebViewUpdateManager {
     *
     * This choice will be stored persistently.
     *
     * @param newProvider the package name to use, or null to reset to default.
     * @param newProvider the package name to use.
     * @return the package name which is now in use, which may not be the
     *         requested one if it was not usable.
     */
@@ -155,7 +155,7 @@ public final class WebViewUpdateManager {
    /**
     * Get the WebView provider which will be used if no explicit choice has been made.
     *
     * The default provider is not guaranteed to be currently valid/usable.
     * The default provider is not guaranteed to be a valid/usable WebView implementation.
     *
     * @return the default WebView provider.
     */