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

Commit 06cd751b authored by Steve Block's avatar Steve Block
Browse files

Adds Java-side of logic to make Geolocation obey Browser 'Enable Location' setting.

This fixes bug http://b/issue?id=2067559.
parent 3be63c09
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -167,6 +167,7 @@ public class WebSettings {
    private boolean         mDatabaseEnabled = false;
    private boolean         mDomStorageEnabled = false;
    private boolean         mWorkersEnabled = false;  // only affects V8.
    private boolean         mGeolocationEnabled = false;
    // HTML5 configuration parameters
    private long            mAppCacheMaxSize = Long.MAX_VALUE;
    private String          mAppCachePath = "";
@@ -1081,6 +1082,18 @@ public class WebSettings {
        }
    }

    /**
     * Sets whether Geolocation is enabled.
     * @param flag Whether Geolocation should be enabled.
     * @hide pending api council approval
     */
    public synchronized void setGeolocationEnabled(boolean flag) {
        if (mGeolocationEnabled != flag) {
            mGeolocationEnabled = flag;
            postSync();
        }
    }

    /**
     * Return true if javascript is enabled. <b>Note: The default is false.</b>
     * @return True if javascript is enabled.