summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorIain Merrick <husky@google.com>2010-12-10 16:17:54 +0000
committerIain Merrick <husky@google.com>2010-12-13 14:28:56 +0000
commit0f868ca036ed6dcd835dfb2d8f8842f344d4f5ff (patch)
tree93be2bdfdede2a3d328682fa90efaf8265e803c9 /core/java
parentd1281286f2e9403b0ae066b823b39ecfd144ba52 (diff)
downloadframeworks_base-0f868ca036ed6dcd835dfb2d8f8842f344d4f5ff.zip
frameworks_base-0f868ca036ed6dcd835dfb2d8f8842f344d4f5ff.tar.gz
frameworks_base-0f868ca036ed6dcd835dfb2d8f8842f344d4f5ff.tar.bz2
Disable CacheManager when using the Chrome HTTP stack.
Currently, cacheDisabled() reports false, but no files are ever added to the cache. This CL makes the framework more honest and reports that the cache is disabled. BUG=3270236 Change-Id: I13c0291ac295d965f71f1e70dbdebc74b95ddce0
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/webkit/CacheManager.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/webkit/CacheManager.java b/core/java/android/webkit/CacheManager.java
index 821bcc6..f4ee238 100644
--- a/core/java/android/webkit/CacheManager.java
+++ b/core/java/android/webkit/CacheManager.java
@@ -181,6 +181,11 @@ public final class CacheManager {
removeAllCacheFiles();
mClearCacheOnInit = false;
}
+ // If we're using the Chrome HTTP stack, disable the cache.
+ // Chrome has its own cache, and we don't provide programmatic access to it.
+ if (JniUtil.useChromiumHttpStack()) {
+ setCacheDisabled(true);
+ }
}
/**
@@ -233,6 +238,10 @@ public final class CacheManager {
if (mDisabled) {
removeAllCacheFiles();
}
+ if (!mDisabled && JniUtil.useChromiumHttpStack()) {
+ Log.w(LOGTAG, "CacheManager enabled, but it will not work as "
+ + "expected because the Chrome HTTP stack is in use.");
+ }
}
/**