summaryrefslogtreecommitdiffstats
path: root/core/java/android/webkit/WebView.java
diff options
context:
space:
mode:
authorTao Bai <michaelbai@google.com>2014-04-15 18:04:49 +0000
committerTao Bai <michaelbai@google.com>2014-04-15 18:04:49 +0000
commit4c22b547761fad31755b76e2fb4fc2c369d61a46 (patch)
tree87f47fd187a436e4fd11f71d67f634b51778bb52 /core/java/android/webkit/WebView.java
parente0a7b08d369e323f524251a44251c902122a6414 (diff)
downloadframeworks_base-4c22b547761fad31755b76e2fb4fc2c369d61a46.zip
frameworks_base-4c22b547761fad31755b76e2fb4fc2c369d61a46.tar.gz
frameworks_base-4c22b547761fad31755b76e2fb4fc2c369d61a46.tar.bz2
Revert "Revert "Define new general permission APIs for webview.""
This reverts commit e0a7b08d369e323f524251a44251c902122a6414. Change-Id: Ieba5a72524e43eb5e2fccb39647fd11e9d9494c8
Diffstat (limited to 'core/java/android/webkit/WebView.java')
-rw-r--r--core/java/android/webkit/WebView.java16
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.
*