Merge change 22262 into eclair
* changes: Adds Java-side of logic to make Geolocation obey Browser 'Enable Location' setting.
This commit is contained in:
@@ -167,6 +167,7 @@ public class WebSettings {
|
|||||||
private boolean mDatabaseEnabled = false;
|
private boolean mDatabaseEnabled = false;
|
||||||
private boolean mDomStorageEnabled = false;
|
private boolean mDomStorageEnabled = false;
|
||||||
private boolean mWorkersEnabled = false; // only affects V8.
|
private boolean mWorkersEnabled = false; // only affects V8.
|
||||||
|
private boolean mGeolocationEnabled = false;
|
||||||
// HTML5 configuration parameters
|
// HTML5 configuration parameters
|
||||||
private long mAppCacheMaxSize = Long.MAX_VALUE;
|
private long mAppCacheMaxSize = Long.MAX_VALUE;
|
||||||
private String mAppCachePath = "";
|
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. <b>Note: The default is false.</b>
|
||||||
* @return True if javascript is enabled.
|
* @return True if javascript is enabled.
|
||||||
|
|||||||
Reference in New Issue
Block a user