Unhide APIs for enabling geolocation in web views. I've confirmed
with Grace that these are okay to unhide.
This commit is contained in:
@ -28,7 +28,6 @@ import java.util.Set;
|
||||
/**
|
||||
* Implements the Java side of GeolocationPermissions. Simply marshalls calls
|
||||
* from the UI thread to the WebKit thread.
|
||||
* @hide
|
||||
*/
|
||||
public final class GeolocationPermissions {
|
||||
/**
|
||||
@ -72,6 +71,7 @@ public final class GeolocationPermissions {
|
||||
|
||||
/**
|
||||
* Gets the singleton instance of the class.
|
||||
* @hide
|
||||
*/
|
||||
public static GeolocationPermissions getInstance() {
|
||||
if (sInstance == null) {
|
||||
@ -82,6 +82,7 @@ public final class GeolocationPermissions {
|
||||
|
||||
/**
|
||||
* Creates the UI message handler. Must be called on the UI thread.
|
||||
* @hide
|
||||
*/
|
||||
public void createUIHandler() {
|
||||
if (mUIHandler == null) {
|
||||
@ -110,6 +111,7 @@ public final class GeolocationPermissions {
|
||||
|
||||
/**
|
||||
* Creates the message handler. Must be called on the WebKit thread.
|
||||
* @hide
|
||||
*/
|
||||
public void createHandler() {
|
||||
if (mHandler == null) {
|
||||
@ -186,6 +188,7 @@ public final class GeolocationPermissions {
|
||||
* WebCore::SecurityOrigin::toString(). As long as all 'HTML 5 modules'
|
||||
* (Database, Geolocation etc) do so, it's safe to match up origins for the
|
||||
* purposes of displaying UI.
|
||||
* @hide
|
||||
*/
|
||||
public void getOrigins(ValueCallback<Set> callback) {
|
||||
if (callback != null) {
|
||||
@ -209,6 +212,7 @@ public final class GeolocationPermissions {
|
||||
|
||||
/**
|
||||
* Gets the permission state for the specified origin.
|
||||
* @hide
|
||||
*/
|
||||
public void getAllowed(String origin, ValueCallback<Boolean> callback) {
|
||||
if (callback == null) {
|
||||
@ -241,6 +245,7 @@ public final class GeolocationPermissions {
|
||||
* Clears the permission state for the specified origin. This method may be
|
||||
* called before the WebKit thread has intialized the message handler.
|
||||
* Messages will be queued until this time.
|
||||
* @hide
|
||||
*/
|
||||
public void clear(String origin) {
|
||||
// Called on the UI thread.
|
||||
@ -261,6 +266,7 @@ public final class GeolocationPermissions {
|
||||
* Allows the specified origin. This method may be called before the WebKit
|
||||
* thread has intialized the message handler. Messages will be queued until
|
||||
* this time.
|
||||
* @hide
|
||||
*/
|
||||
public void allow(String origin) {
|
||||
// Called on the UI thread.
|
||||
@ -279,6 +285,7 @@ public final class GeolocationPermissions {
|
||||
|
||||
/**
|
||||
* Clears the permission state for all origins.
|
||||
* @hide
|
||||
*/
|
||||
public void clearAll() {
|
||||
// Called on the UI thread.
|
||||
|
@ -240,14 +240,12 @@ public class WebChromeClient {
|
||||
/**
|
||||
* Instructs the client to show a prompt to ask the user to set the
|
||||
* Geolocation permission state for the specified origin.
|
||||
* @hide pending API council approval.
|
||||
*/
|
||||
public void onGeolocationPermissionsShowPrompt(String origin,
|
||||
GeolocationPermissions.Callback callback) {}
|
||||
|
||||
/**
|
||||
* Instructs the client to hide the Geolocation permissions prompt.
|
||||
* @hide pending API council approval.
|
||||
*/
|
||||
public void onGeolocationPermissionsHidePrompt() {}
|
||||
|
||||
|
@ -1005,7 +1005,6 @@ public class WebSettings {
|
||||
* @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)) {
|
||||
@ -1122,7 +1121,6 @@ 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) {
|
||||
|
Reference in New Issue
Block a user