diff options
author | Andrei Popescu <andreip@google.com> | 2009-04-17 10:43:42 +0100 |
---|---|---|
committer | Andrei Popescu <andreip@google.com> | 2009-04-20 14:23:58 +0100 |
commit | 60a9a7d05577a65c8904fcb5f32b6a7a10886a13 (patch) | |
tree | 285658c9c9cd112c187d1b38784e68d287e6db96 /core/java/android/webkit/WebSettings.java | |
parent | 7a430cf152fa6a55be2f04e1318baafb69bb5bc0 (diff) | |
download | frameworks_base-60a9a7d05577a65c8904fcb5f32b6a7a10886a13.zip frameworks_base-60a9a7d05577a65c8904fcb5f32b6a7a10886a13.tar.gz frameworks_base-60a9a7d05577a65c8904fcb5f32b6a7a10886a13.tar.bz2 |
Enable Application Caches.
Diffstat (limited to 'core/java/android/webkit/WebSettings.java')
-rw-r--r-- | core/java/android/webkit/WebSettings.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java index bc8e3d9..c18f157 100644 --- a/core/java/android/webkit/WebSettings.java +++ b/core/java/android/webkit/WebSettings.java @@ -159,6 +159,8 @@ public class WebSettings { private boolean mSupportZoom = true; private boolean mBuiltInZoomControls = false; private boolean mAllowFileAccess = true; + private String mAppCachePath = ""; + private boolean mAppCacheEnabled = false; // Class to handle messages before WebCore is ready. private class EventHandler { @@ -899,6 +901,33 @@ public class WebSettings { } /** + * Tell the WebView to enable Application Caches API. + * @param flag True if the WebView should enable Application Caches. + * @hide pending api council approval + */ + public synchronized void setAppCacheEnabled(boolean flag) { + if (mAppCacheEnabled != flag) { + mAppCacheEnabled = flag; + postSync(); + } + } + + /** + * Set a custom path to the Application Caches files. The client + * must ensure it exists before this call. + * @param appCachePath String path to the directory containing Application + * Caches files. The appCache path can be the empty string but should not + * be null. Passing null for this parameter will result in a no-op. + * @hide pending api council approval + */ + public synchronized void setAppCachePath(String appCachePath) { + if (appCachePath != null && !appCachePath.equals(mAppCachePath)) { + mAppCachePath = appCachePath; + postSync(); + } + } + + /** * Return true if javascript is enabled. <b>Note: The default is false.</b> * @return True if javascript is enabled. */ |