Part of fix for bug 3424424 Browser hanging
Not calling redundant android stack cookie code when the chrome
stack is enabled.
Change-Id: I6faea89295e0cae02f5aa19a6ddeec43a4b73a44
diff --git a/core/java/android/webkit/CookieSyncManager.java b/core/java/android/webkit/CookieSyncManager.java
index 8393980..313f755 100644
--- a/core/java/android/webkit/CookieSyncManager.java
+++ b/core/java/android/webkit/CookieSyncManager.java
@@ -178,14 +178,16 @@
return;
}
- manager.flushCookieStore();
+ if (JniUtil.useChromiumHttpStack()) {
+ manager.flushCookieStore();
+ } else {
+ ArrayList<Cookie> cookieList = manager.getUpdatedCookiesSince(mLastUpdate);
+ mLastUpdate = System.currentTimeMillis();
+ syncFromRamToFlash(cookieList);
- ArrayList<Cookie> cookieList = manager.getUpdatedCookiesSince(mLastUpdate);
- mLastUpdate = System.currentTimeMillis();
- syncFromRamToFlash(cookieList);
-
- ArrayList<Cookie> lruList = manager.deleteLRUDomain();
- syncFromRamToFlash(lruList);
+ ArrayList<Cookie> lruList = manager.deleteLRUDomain();
+ syncFromRamToFlash(lruList);
+ }
if (DebugFlags.COOKIE_SYNC_MANAGER) {
Log.v(LOGTAG, "CookieSyncManager::syncFromRamToFlash DONE");