summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/CacheManager.java
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-01-20 12:42:16 +0000
committerKristian Monsen <kristianm@google.com>2011-01-20 14:31:20 +0000
commitcedb3a7e5849fd16e939add1ac6f5586467b8c68 (patch)
tree4eb466ce78278a5f9dcef0eaebe1162390b77646 /core/java/android/webkit/CacheManager.java
parent9f7e83b4062beba5b3ce7d3693505ec082f7d3f6 (diff)
Clear the files we copy over to the temp cache
Fixes CTS tests Change-Id: I3464ac90e58a9df21379a8da9d637f4f5ee69b85
Diffstat (limited to 'core/java/android/webkit/CacheManager.java')
-rw-r--r--core/java/android/webkit/CacheManager.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/webkit/CacheManager.java b/core/java/android/webkit/CacheManager.java
index 6073f7a92414..a553a4592720 100644
--- a/core/java/android/webkit/CacheManager.java
+++ b/core/java/android/webkit/CacheManager.java
@@ -244,6 +244,9 @@ public final class CacheManager {
* obtained from {@link android.webkit.CacheManager.CacheResult#getLocalPath}, this
* identifies the cache file.
*
+ * Cache files are not guaranteed to be in this directory before
+ * CacheManager#getCacheFile(String, Map<String, String>) is called.
+ *
* @return File The base directory of the cache.
*
* @deprecated Access to the HTTP cache will be removed in a future release.
@@ -611,8 +614,9 @@ public final class CacheManager {
return true;
}
// delete rows in the cache database
- WebViewWorker.getHandler().sendEmptyMessage(
- WebViewWorker.MSG_CLEAR_CACHE);
+ if (!JniUtil.useChromiumHttpStack())
+ WebViewWorker.getHandler().sendEmptyMessage(WebViewWorker.MSG_CLEAR_CACHE);
+
// delete cache files in a separate thread to not block UI.
final Runnable clearCache = new Runnable() {
public void run() {