am 8a2000df: Merge change 22262 into eclair

Merge commit '8a2000df6d32f4e5df3073753055800a9363a3a5' into eclair-plus-aosp

* commit '8a2000df6d32f4e5df3073753055800a9363a3a5':
  Adds Java-side of logic to make Geolocation obey Browser 'Enable Location' setting.
This commit is contained in:
Steve Block
2009-08-24 03:09:07 -07:00
committed by Android Git Automerger

View File

@@ -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.