Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba9f5f3f authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 22440 into eclair

* changes:
  Java-side changes to persist Geolocation permissions between browser sessions.
parents b321625b 9d3273f6
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -172,6 +172,7 @@ public class WebSettings {
    private long            mAppCacheMaxSize = Long.MAX_VALUE;
    private String          mAppCachePath = "";
    private String          mDatabasePath = "";
    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
    // native WebCore code.
@@ -977,6 +978,21 @@ public class WebSettings {
        }
    }

    /**
     * Set the path where the Geolocation permissions database should be saved.
     * This will update WebCore when the Sync runs in the C++ side.
     * @param databasePath String path to the directory where the Geolocation
     *     permissions database should be saved. May be the empty string but
     *     should never be null.
     * @hide pending api council approval
     */
    public synchronized void setGeolocationDatabasePath(String databasePath) {
        if (databasePath != null && !databasePath.equals(mDatabasePath)) {
            mGeolocationDatabasePath = databasePath;
            postSync();
        }
    }

    /**
     * Tell the WebView to enable Application Caches API.
     * @param flag True if the WebView should enable Application Caches.