summaryrefslogtreecommitdiffstats
path: root/core/java/android/webkit
diff options
context:
space:
mode:
authorAndrei Popescu <andreip@google.com>2009-07-22 16:47:52 +0100
committerAndrei Popescu <andreip@google.com>2009-07-22 16:54:16 +0100
commit1c829208eadf175ad4600e70a14013b50a20adfe (patch)
tree88a60e0f189522f8c078d28c3c94fc0e2e3a95ee /core/java/android/webkit
parentbc4aa5f6935bb91aab3f9913e460771f2f012f8d (diff)
downloadframeworks_base-1c829208eadf175ad4600e70a14013b50a20adfe.zip
frameworks_base-1c829208eadf175ad4600e70a14013b50a20adfe.tar.gz
frameworks_base-1c829208eadf175ad4600e70a14013b50a20adfe.tar.bz2
Enforce app cache maximum size
Diffstat (limited to 'core/java/android/webkit')
-rw-r--r--core/java/android/webkit/WebSettings.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 8f3d55f..b56f167 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -181,6 +181,7 @@ public class WebSettings {
private boolean mDatabaseEnabled = false;
private String mAppCachePath = "";
private boolean mAppCacheEnabled = false;
+ private long mAppCacheMaxSize = Long.MAX_VALUE;
private boolean mDomStorageEnabled = false;
// Class to handle messages before WebCore is ready.
@@ -996,6 +997,19 @@ public class WebSettings {
}
/**
+ * Set the maximum size for the Application Caches content.
+ * @param appCacheMaxSize the maximum size in bytes.
+ *
+ * @hide pending api council approval
+ */
+ public synchronized void setAppCacheMaxSize(long appCacheMaxSize) {
+ if (appCacheMaxSize != mAppCacheMaxSize) {
+ mAppCacheMaxSize = appCacheMaxSize;
+ postSync();
+ }
+ }
+
+ /**
* Set whether the database storage API is enabled.
* @param flag boolean True if the WebView should use the database storage
* API.