summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike LeBeau <mlebeau@android.com>2009-09-29 19:40:28 -0700
committerMike LeBeau <mlebeau@android.com>2009-09-29 19:40:28 -0700
commit2e4dbe70e7c0fe003dab0837fd1dba2703bdd6e2 (patch)
tree321d46e13922fcdf8e7bec427730a6ba32f1ff61
parenta4c96aa2fadb0c8642a2c8da5f8368cc3de06ed0 (diff)
downloadframeworks_base-2e4dbe70e7c0fe003dab0837fd1dba2703bdd6e2.zip
frameworks_base-2e4dbe70e7c0fe003dab0837fd1dba2703bdd6e2.tar.gz
frameworks_base-2e4dbe70e7c0fe003dab0837fd1dba2703bdd6e2.tar.bz2
Unhide APIs for enabling geolocation in web views. I've confirmed
with Grace that these are okay to unhide.
-rw-r--r--api/current.xml94
-rwxr-xr-xcore/java/android/webkit/GeolocationPermissions.java9
-rw-r--r--core/java/android/webkit/WebChromeClient.java2
-rw-r--r--core/java/android/webkit/WebSettings.java2
4 files changed, 102 insertions, 5 deletions
diff --git a/api/current.xml b/api/current.xml
index 53ca959..4d4a24d 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -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"
diff --git a/core/java/android/webkit/GeolocationPermissions.java b/core/java/android/webkit/GeolocationPermissions.java
index c0cac01..483e9e9 100755
--- a/core/java/android/webkit/GeolocationPermissions.java
+++ b/core/java/android/webkit/GeolocationPermissions.java
@@ -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.
diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java
index 1ae1d85..bbc567d 100644
--- a/core/java/android/webkit/WebChromeClient.java
+++ b/core/java/android/webkit/WebChromeClient.java
@@ -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() {}
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 0cfcb95..4fedec9 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -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) {