summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSelim Gurun <sgurun@google.com>2012-06-28 11:21:05 -0700
committerSelim Gurun <sgurun@google.com>2012-07-10 10:36:12 -0700
commitb632adfaf445ff6f0c07bfc54671d204ad0e5a67 (patch)
treef670d9e6436986187b6f9fa91ba64b8c81b88c0d /core
parent28b7809e309637decc867547dc34b7635785c5f8 (diff)
downloadframeworks_base-b632adfaf445ff6f0c07bfc54671d204ad0e5a67.zip
frameworks_base-b632adfaf445ff6f0c07bfc54671d204ad0e5a67.tar.gz
frameworks_base-b632adfaf445ff6f0c07bfc54671d204ad0e5a67.tar.bz2
Update documentation to clarify AppCache usage
Bug: 5869022 Change-Id: I46abecfb0e8975cc924458f444f95cdabaa3f712
Diffstat (limited to 'core')
-rw-r--r--core/java/android/webkit/WebSettings.java7
-rw-r--r--core/java/android/webkit/WebStorage.java18
2 files changed, 17 insertions, 8 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index f2a041a..5e5e23c 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -1005,8 +1005,11 @@ public abstract class WebSettings {
}
/**
- * Sets the maximum size for the Application Caches content. The default is
- * {@link Long#MAX_VALUE}.
+ * Sets the maximum size for the Application Cache content. The passed size
+ * will be rounded to the nearest value that the database can support, so
+ * this should be viewed as a guide, not a hard limit. Setting the
+ * size to a value less than current database size does not cause the
+ * database to be trimmed. The default size is {@link Long.MAX_VALUE}.
*
* @param appCacheMaxSize the maximum size in bytes
*/
diff --git a/core/java/android/webkit/WebStorage.java b/core/java/android/webkit/WebStorage.java
index 76674f4..1e955bd 100644
--- a/core/java/android/webkit/WebStorage.java
+++ b/core/java/android/webkit/WebStorage.java
@@ -23,17 +23,22 @@ import java.util.Map;
* {@link WebView}. It manages the Application Cache API, the Web SQL Database
* API and the HTML5 Web Storage API.
*
- * The Web SQL Database API provides storage which is private to a given
- * origin, where an origin comprises the host, scheme and port of a URI.
- * Similarly, use of the Application Cache API can be attributed to an origin.
- * This class provides access to the storage use and quotas for these APIs for
- * a given origin. Origins are represented using {@link WebStorage.Origin}.
+ * The Application Cache API provides a mechanism to create and maintain an
+ * application cache to power offline Web applications. Use of the Application
+ * Cache API can be attributed to an origin {@link WebStorage.Origin}, however
+ * it is not possible to set per-origin quotas. Note that there can be only
+ * one application cache per application.
+ *
+ * The Web SQL Database API provides storage which is private to a given origin.
+ * Similar to the Application Cache, use of the Web SQL Database can be attributed
+ * to an origin. It is also possible to set per-origin quotas.
*/
public class WebStorage {
/**
* Encapsulates a callback function which is used to provide a new quota
- * for a JavaScript storage API. See
+ * for a JavaScript storage API.
+ * See
* {@link WebChromeClient#onExceededDatabaseQuota} and
* {@link WebChromeClient#onReachedMaxAppCacheSize}.
*/
@@ -54,6 +59,7 @@ public class WebStorage {
/**
* This class encapsulates information about the amount of storage
* currently used by an origin for the JavaScript storage APIs.
+ * An origin comprises the host, scheme and port of a URI.
* See {@link WebStorage} for details.
*/
public static class Origin {