diff options
author | Tao Bai <michaelbai@google.com> | 2014-03-28 22:06:00 -0700 |
---|---|---|
committer | Tao Bai <michaelbai@google.com> | 2014-04-10 20:48:41 -0700 |
commit | 672b99c8f80177784053074d178fdea6750e82df (patch) | |
tree | 87f47fd187a436e4fd11f71d67f634b51778bb52 /core/java/android/webkit/WebView.java | |
parent | 2adb64c96671bf39bfa74c5416f117afd13f4091 (diff) | |
download | frameworks_base-672b99c8f80177784053074d178fdea6750e82df.zip frameworks_base-672b99c8f80177784053074d178fdea6750e82df.tar.gz frameworks_base-672b99c8f80177784053074d178fdea6750e82df.tar.bz2 |
Define new general permission APIs for webview.
This will give us ability to add new webview featrues which requires permission without changing API during the WebView autoupdate.
Also deprecated geolocation permission related APIs.
BUG: 13699047
Change-Id: I6a557e11eb26c6ca236d44e75600e0b265fd791c
Diffstat (limited to 'core/java/android/webkit/WebView.java')
-rw-r--r-- | core/java/android/webkit/WebView.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 81d36a4..bde1b93 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -25,6 +25,7 @@ import android.graphics.Paint; import android.graphics.Picture; import android.graphics.Rect; import android.graphics.drawable.Drawable; +import android.net.Uri; import android.net.http.SslCertificate; import android.os.Build; import android.os.Bundle; @@ -1640,6 +1641,21 @@ public class WebView extends AbsoluteLayout } /** + * Preauthorize the given origin to access resources. + * This authorization only valid for this WebView instance life cycle and + * will not retained. + * + * @param origin the origin authorized to access resources + * @param resources the resource authorized to be accessed by origin. + * + * @hide + */ + public void preauthorizePermission(Uri origin, long resources) { + checkThread(); + mProvider.preauthorizePermission(origin, resources); + } + + /** * Sets the Picture listener. This is an interface used to receive * notifications of a new Picture. * |