summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-02-25 18:41:56 +0000
committerBen Murdoch <benm@google.com>2010-02-25 18:41:56 +0000
commit18773afa64d407ebdd4bfc7bc151497d4447884d (patch)
tree30fc4ac1f653d27f3d447f5f63cc8faa1eac618d /core/java
parentbda568fb80a74bc965294572d94af6ff1486f73b (diff)
downloadframeworks_base-18773afa64d407ebdd4bfc7bc151497d4447884d.zip
frameworks_base-18773afa64d407ebdd4bfc7bc151497d4447884d.tar.gz
frameworks_base-18773afa64d407ebdd4bfc7bc151497d4447884d.tar.bz2
Keep track of when the HTML5 database path has been set, so that we don't inadvertantly sync it to the native side before it
has been set by the client. Change-Id: Idcf604060e5208ec28610dd13e9858adcf44165e
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/webkit/WebSettings.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 662be95..8981419 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -173,6 +173,9 @@ public class WebSettings {
private long mAppCacheMaxSize = Long.MAX_VALUE;
private String mAppCachePath = "";
private String mDatabasePath = "";
+ // The WebCore DatabaseTracker only allows the database path to be set
+ // once. Keep track of when the path has been set.
+ private boolean mDatabasePathHasBeenSet = false;
private String mGeolocationDatabasePath = "";
// Don't need to synchronize the get/set methods as they
// are basic types, also none of these values are used in
@@ -1006,13 +1009,15 @@ public class WebSettings {
/**
* Set the path to where database storage API databases should be saved.
+ * Nota that the WebCore Database Tracker only allows the path to be set once.
* This will update WebCore when the Sync runs in the C++ side.
* @param databasePath String path to the directory where databases should
* be saved. May be the empty string but should never be null.
*/
public synchronized void setDatabasePath(String databasePath) {
- if (databasePath != null && !databasePath.equals(mDatabasePath)) {
+ if (databasePath != null && !mDatabasePathHasBeenSet) {
mDatabasePath = databasePath;
+ mDatabasePathHasBeenSet = true;
postSync();
}
}