summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ben Murdoch <benm@google.com> 2010-02-26 02:11:18 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2010-02-26 02:11:18 -0800
commitb5e15690dc9a21435c378cc73234d0a324f6eee8 (patch)
tree76e20f9265305fd179c8b1ead862ebc727ecfa65
parent0402e7da70715c96af90aa95c16d1bedc5199645 (diff)
parent18773afa64d407ebdd4bfc7bc151497d4447884d (diff)
Merge "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."
-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 662be95d29ae..89814196f710 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();
}
}