diff --git a/core/java/android/webkit/PermissionRequest.java b/core/java/android/webkit/PermissionRequest.java index 18ec334d0283a..ac145b1d81a5e 100644 --- a/core/java/android/webkit/PermissionRequest.java +++ b/core/java/android/webkit/PermissionRequest.java @@ -32,7 +32,7 @@ import android.net.Uri; * avoid unintentionally granting requests for new permissions, you should pass the * specific permissions you intend to grant to {@link #grant(String[]) grant()}, * and avoid writing code like this example: - *
+ ** permissionRequest.grant(permissionRequest.getResources()) // This is wrong!!! ** See the WebView's release notes for information about new protected resources. diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java index 95fe963d7891e..4db630808ef1b 100644 --- a/core/java/android/webkit/WebChromeClient.java +++ b/core/java/android/webkit/WebChromeClient.java @@ -519,15 +519,17 @@ public class WebChromeClient { * may not be supported and applications wishing to support these sources * or more advanced file operations should build their own Intent. * - *- * How to use: - * 1. Build an intent using {@link #createIntent} - * 2. Fire the intent using {@link android.app.Activity#startActivityForResult}. - * 3. Check for ActivityNotFoundException and take a user friendly action if thrown. - * 4. Listen the result using {@link android.app.Activity#onActivityResult} - * 5. Parse the result using {@link #parseResult} only if media capture was not requested. - * 6. Send the result using filePathCallback of {@link WebChromeClient#onShowFileChooser} - *+ *How to use: + *
+ *
* * @return an Intent that supports basic file chooser sources. */ diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index a35659e307d55..e4b5eaa56aa6c 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -762,7 +762,7 @@ public class WebView extends AbsoluteLayout * encoded. If the data is base64 encoded, the value of the encoding * parameter must be {@code "base64"}. HTML can be encoded with {@link * android.util.Base64#encodeToString(byte[],int)} like so: - *- Build an intent using {@link #createIntent}
+ *- Fire the intent using {@link android.app.Activity#startActivityForResult}.
+ *- Check for ActivityNotFoundException and take a user friendly action if thrown.
+ *- Listen the result using {@link android.app.Activity#onActivityResult}
+ *- Parse the result using {@link #parseResult} only if media capture was not + * requested.
+ *- Send the result using filePathCallback of {@link + * WebChromeClient#onShowFileChooser}
+ *+ ** String unencodedHtml = * "<html><body>'%28' is the code for '('</body></html>"; * String encodedHtml = Base64.encodeToString(unencodedHtml.getBytes(), Base64.NO_PADDING); @@ -1854,7 +1854,7 @@ public class WebView extends AbsoluteLayout * important security note below for implications. *Note that injected objects will not appear in JavaScript until the page is next * (re)loaded. JavaScript should be enabled before injecting the object. For example: - *
+ ** class JsObject { * {@literal @}JavascriptInterface * public String toString() { return "injectedObject"; }