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

Commit c1b77558 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove synchronized from static methods in WebView."

parents 16560f6e 59375a01
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -45254,7 +45254,7 @@ package android.webkit {
    method public static boolean allowFileSchemeCookies();
    method public abstract void flush();
    method public abstract java.lang.String getCookie(java.lang.String);
    method public static synchronized android.webkit.CookieManager getInstance();
    method public static android.webkit.CookieManager getInstance();
    method public abstract boolean hasCookies();
    method public abstract deprecated void removeAllCookie();
    method public abstract void removeAllCookies(android.webkit.ValueCallback<java.lang.Boolean>);
@@ -45269,8 +45269,8 @@ package android.webkit {
  }
  public final deprecated class CookieSyncManager extends android.webkit.WebSyncManager {
    method public static synchronized android.webkit.CookieSyncManager createInstance(android.content.Context);
    method public static synchronized android.webkit.CookieSyncManager getInstance();
    method public static android.webkit.CookieSyncManager createInstance(android.content.Context);
    method public static android.webkit.CookieSyncManager getInstance();
    method protected deprecated void syncFromRamToFlash();
    field protected static final java.lang.String LOGTAG = "websync";
    field protected android.webkit.WebViewDatabase mDataBase;
+3 −3
Original line number Diff line number Diff line
@@ -48416,7 +48416,7 @@ package android.webkit {
    method public abstract java.lang.String getCookie(java.lang.String);
    method public abstract java.lang.String getCookie(java.lang.String, boolean);
    method public synchronized java.lang.String getCookie(android.net.WebAddress);
    method public static synchronized android.webkit.CookieManager getInstance();
    method public static android.webkit.CookieManager getInstance();
    method public abstract boolean hasCookies();
    method public abstract boolean hasCookies(boolean);
    method public abstract deprecated void removeAllCookie();
@@ -48433,8 +48433,8 @@ package android.webkit {
  }
  public final deprecated class CookieSyncManager extends android.webkit.WebSyncManager {
    method public static synchronized android.webkit.CookieSyncManager createInstance(android.content.Context);
    method public static synchronized android.webkit.CookieSyncManager getInstance();
    method public static android.webkit.CookieSyncManager createInstance(android.content.Context);
    method public static android.webkit.CookieSyncManager getInstance();
    method protected deprecated void syncFromRamToFlash();
    field protected static final java.lang.String LOGTAG = "websync";
    field protected android.webkit.WebViewDatabase mDataBase;
+3 −3
Original line number Diff line number Diff line
@@ -45334,7 +45334,7 @@ package android.webkit {
    method public static boolean allowFileSchemeCookies();
    method public abstract void flush();
    method public abstract java.lang.String getCookie(java.lang.String);
    method public static synchronized android.webkit.CookieManager getInstance();
    method public static android.webkit.CookieManager getInstance();
    method public abstract boolean hasCookies();
    method public abstract deprecated void removeAllCookie();
    method public abstract void removeAllCookies(android.webkit.ValueCallback<java.lang.Boolean>);
@@ -45349,8 +45349,8 @@ package android.webkit {
  }
  public final deprecated class CookieSyncManager extends android.webkit.WebSyncManager {
    method public static synchronized android.webkit.CookieSyncManager createInstance(android.content.Context);
    method public static synchronized android.webkit.CookieSyncManager getInstance();
    method public static android.webkit.CookieSyncManager createInstance(android.content.Context);
    method public static android.webkit.CookieSyncManager getInstance();
    method protected deprecated void syncFromRamToFlash();
    field protected static final java.lang.String LOGTAG = "websync";
    field protected android.webkit.WebViewDatabase mDataBase;
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ public abstract class CookieManager {
     *
     * @return the singleton CookieManager instance
     */
    public static synchronized CookieManager getInstance() {
    public static CookieManager getInstance() {
        return WebViewFactory.getProvider().getCookieManager();
    }

+15 −10
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ public final class CookieSyncManager extends WebSyncManager {

    private static CookieSyncManager sRef;
    private static boolean sGetInstanceAllowed = false;
    private static final Object sLock = new Object();

    private CookieSyncManager() {
        super(null, null);
@@ -77,26 +78,30 @@ public final class CookieSyncManager extends WebSyncManager {
     *
     * @return CookieSyncManager
     */
    public static synchronized CookieSyncManager getInstance() {
    public static CookieSyncManager getInstance() {
        synchronized (sLock) {
            checkInstanceIsAllowed();
            if (sRef == null) {
                sRef = new CookieSyncManager();
            }
            return sRef;
        }
    }

    /**
     * Create a singleton CookieSyncManager within a context
     * @param context
     * @return CookieSyncManager
     */
    public static synchronized CookieSyncManager createInstance(Context context) {
    public static CookieSyncManager createInstance(Context context) {
        synchronized (sLock) {
            if (context == null) {
                throw new IllegalArgumentException("Invalid context argument");
            }
            setGetInstanceIsAllowed();
            return getInstance();
        }
    }

    /**
     * sync() forces sync manager to sync now
Loading