OSDN Git Service

Browser-side changes to persist Geolocation permissions between browser sessions.
authorSteve Block <steveblock@google.com>
Fri, 21 Aug 2009 12:16:58 +0000 (13:16 +0100)
committerSteve Block <steveblock@google.com>
Mon, 24 Aug 2009 10:35:02 +0000 (11:35 +0100)
This fixes bug http://b/issue?id=2054365.

src/com/android/browser/BrowserSettings.java

index 0ebf7de..b7ff0d3 100644 (file)
@@ -84,6 +84,7 @@ class BrowserSettings extends Observable {
     private long appCacheMaxSize = Long.MAX_VALUE;
     private String appCachePath;  // default value set in loadFromDb().
     private String databasePath; // default value set in loadFromDb()
+    private String geolocationDatabasePath; // default value set in loadFromDb()
     private WebStorageSizeManager webStorageSizeManager;
 
     private String jsFlags = "";
@@ -220,6 +221,7 @@ class BrowserSettings extends Observable {
             s.setAppCacheMaxSize(b.appCacheMaxSize);
             s.setAppCachePath(b.appCachePath);
             s.setDatabasePath(b.databasePath);
+            s.setGeolocationDatabasePath(b.geolocationDatabasePath);
 
             // Enable/Disable the error console.
             b.mTabControl.getBrowserActivity().setShouldShowErrorConsole(
@@ -253,6 +255,8 @@ class BrowserSettings extends Observable {
         appCacheMaxSize = webStorageSizeManager.getAppCacheMaxSize();
         // Set the default value for the Database path.
         databasePath = ctx.getDir("databases", 0).getPath();
+        // Set the default value for the Geolocation database path.
+        geolocationDatabasePath = ctx.getDir("geolocation", 0).getPath();
 
         homeUrl = getFactoryResetHomeUrl(ctx);