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

Commit 1e13fae3 authored by Nate Fischer's avatar Nate Fischer
Browse files

WebView: deprecate accidentally-exposed constructors

This deprecates public-exposed constructors. These constructors were
exposed by accident. These classes shouldn't be instantiated by
applications, but should only be instantiated by WebView.

In some cases, the app should get a singleton instance using
a #getInstance method. In these cases, we document this explicitly in
the deprecation note.

Bug: 110807530
Test: make docs, manually verify docs look good.
Change-Id: Ibe73b3399c9ced0cf4fbb01e1df13564476df252
parent abdaf5b5
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -51406,7 +51406,7 @@ package android.webkit {
  }
  public abstract class CookieManager {
    ctor public CookieManager();
    ctor public deprecated CookieManager();
    method public abstract boolean acceptCookie();
    method public abstract boolean acceptThirdPartyCookies(android.webkit.WebView);
    method public static boolean allowFileSchemeCookies();
@@ -51506,13 +51506,13 @@ package android.webkit {
  }
  public abstract class RenderProcessGoneDetail {
    ctor public RenderProcessGoneDetail();
    ctor public deprecated RenderProcessGoneDetail();
    method public abstract boolean didCrash();
    method public abstract int rendererPriorityAtExit();
  }
  public abstract class SafeBrowsingResponse {
    ctor public SafeBrowsingResponse();
    ctor public deprecated SafeBrowsingResponse();
    method public abstract void backToSafety(boolean);
    method public abstract void proceed(boolean);
    method public abstract void showInterstitial(boolean);
@@ -51524,7 +51524,7 @@ package android.webkit {
  }
  public abstract class ServiceWorkerController {
    ctor public ServiceWorkerController();
    ctor public deprecated ServiceWorkerController();
    method public static android.webkit.ServiceWorkerController getInstance();
    method public abstract android.webkit.ServiceWorkerWebSettings getServiceWorkerWebSettings();
    method public abstract void setServiceWorkerClient(android.webkit.ServiceWorkerClient);
@@ -51573,7 +51573,7 @@ package android.webkit {
  }
  public abstract class TracingController {
    ctor public TracingController();
    ctor public deprecated TracingController();
    method public static android.webkit.TracingController getInstance();
    method public abstract boolean isTracing();
    method public abstract void start(android.webkit.TracingConfig);
@@ -52113,7 +52113,7 @@ package android.webkit {
  }
  public abstract class WebViewDatabase {
    ctor public WebViewDatabase();
    ctor public deprecated WebViewDatabase();
    method public abstract deprecated void clearFormData();
    method public abstract void clearHttpAuthUsernamePassword();
    method public abstract deprecated void clearUsernamePassword();
+7 −0
Original line number Diff line number Diff line
@@ -25,6 +25,13 @@ import android.net.WebAddress;
 * Cookies are manipulated according to RFC2109.
 */
public abstract class CookieManager {
    /**
     * @deprecated This class should not be constructed by applications, use {@link #getInstance}
     * instead to fetch the singleton instance.
     */
    // TODO(ntfschr): mark this as @SystemApi after a year.
    @Deprecated
    public CookieManager() {}

    @Override
    protected Object clone() throws CloneNotSupportedException {
+7 −0
Original line number Diff line number Diff line
@@ -21,6 +21,13 @@ package android.webkit;
 * exited. The application may use this to decide how to handle the situation.
 **/
public abstract class RenderProcessGoneDetail {
    /**
     * @deprecated This class should not be constructed by applications.
     */
    // TODO(ntfschr): mark this as @SystemApi after a year.
    @Deprecated
    public RenderProcessGoneDetail() {}

    /**
     * Indicates whether the render process was observed to crash, or whether
     * it was killed by the system.
+6 −0
Original line number Diff line number Diff line
@@ -27,6 +27,12 @@ package android.webkit;
 * {@link android.webkit.WebView#getSafeBrowsingPrivacyPolicyUrl()}.
 */
public abstract class SafeBrowsingResponse {
    /**
     * @deprecated This class should not be constructed by applications.
     */
    // TODO(ntfschr): mark this as @SystemApi after a year.
    @Deprecated
    public SafeBrowsingResponse() {}

    /**
     * Display the default interstitial.
+8 −0
Original line number Diff line number Diff line
@@ -37,6 +37,14 @@ import android.annotation.Nullable;
 */
public abstract class ServiceWorkerController {

    /**
     * @deprecated This class should not be constructed by applications, use {@link #getInstance()}
     * instead to fetch the singleton instance.
     */
    // TODO(ntfschr): mark this as @SystemApi after a year.
    @Deprecated
    public ServiceWorkerController() {}

    /**
     * Returns the default ServiceWorkerController instance. At present there is
     * only one ServiceWorkerController instance for all WebView instances,
Loading