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