Unhide APIs for enabling geolocation in web views. I've confirmed
with Grace that these are okay to unhide.
This commit is contained in:
@@ -171985,6 +171985,48 @@
|
||||
</parameter>
|
||||
</method>
|
||||
</interface>
|
||||
<class name="GeolocationPermissions"
|
||||
extends="java.lang.Object"
|
||||
abstract="false"
|
||||
static="false"
|
||||
final="true"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
<constructor name="GeolocationPermissions"
|
||||
type="android.webkit.GeolocationPermissions"
|
||||
static="false"
|
||||
final="false"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
</constructor>
|
||||
</class>
|
||||
<interface name="GeolocationPermissions.Callback"
|
||||
abstract="true"
|
||||
static="true"
|
||||
final="false"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
<method name="invoke"
|
||||
return="void"
|
||||
abstract="true"
|
||||
native="false"
|
||||
synchronized="false"
|
||||
static="false"
|
||||
final="false"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
<parameter name="origin" type="java.lang.String">
|
||||
</parameter>
|
||||
<parameter name="allow" type="boolean">
|
||||
</parameter>
|
||||
<parameter name="remember" type="boolean">
|
||||
</parameter>
|
||||
</method>
|
||||
</interface>
|
||||
<class name="HttpAuthHandler"
|
||||
extends="android.os.Handler"
|
||||
abstract="false"
|
||||
@@ -173086,6 +173128,32 @@
|
||||
<parameter name="quotaUpdater" type="android.webkit.WebStorage.QuotaUpdater">
|
||||
</parameter>
|
||||
</method>
|
||||
<method name="onGeolocationPermissionsHidePrompt"
|
||||
return="void"
|
||||
abstract="false"
|
||||
native="false"
|
||||
synchronized="false"
|
||||
static="false"
|
||||
final="false"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
</method>
|
||||
<method name="onGeolocationPermissionsShowPrompt"
|
||||
return="void"
|
||||
abstract="false"
|
||||
native="false"
|
||||
synchronized="false"
|
||||
static="false"
|
||||
final="false"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
<parameter name="origin" type="java.lang.String">
|
||||
</parameter>
|
||||
<parameter name="callback" type="android.webkit.GeolocationPermissions.Callback">
|
||||
</parameter>
|
||||
</method>
|
||||
<method name="onJsAlert"
|
||||
return="boolean"
|
||||
abstract="false"
|
||||
@@ -173924,6 +173992,32 @@
|
||||
<parameter name="font" type="java.lang.String">
|
||||
</parameter>
|
||||
</method>
|
||||
<method name="setGeolocationDatabasePath"
|
||||
return="void"
|
||||
abstract="false"
|
||||
native="false"
|
||||
synchronized="true"
|
||||
static="false"
|
||||
final="false"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
<parameter name="databasePath" type="java.lang.String">
|
||||
</parameter>
|
||||
</method>
|
||||
<method name="setGeolocationEnabled"
|
||||
return="void"
|
||||
abstract="false"
|
||||
native="false"
|
||||
synchronized="true"
|
||||
static="false"
|
||||
final="false"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
<parameter name="flag" type="boolean">
|
||||
</parameter>
|
||||
</method>
|
||||
<method name="setJavaScriptCanOpenWindowsAutomatically"
|
||||
return="void"
|
||||
abstract="false"
|
||||
|
||||
@@ -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