From 06fd060c14cdda081089be65e57b616b809670c4 Mon Sep 17 00:00:00 2001 From: Nate Fischer Date: Mon, 12 Aug 2019 20:44:51 -0700 Subject: WebView: prettyprint docs No change to logic, only docs. Use class=prettyprint so docs are syntax highlighted. This also fixes a section which should have been an ordered list but abused
 instead.

Bug: 125526827
Test: make -j4 docs
Change-Id: Iac780ace066be35620d5121b1977df404eaf18c1
---
 core/java/android/webkit/PermissionRequest.java |  2 +-
 core/java/android/webkit/WebChromeClient.java   | 20 +++++++++++---------
 core/java/android/webkit/WebView.java           |  4 ++--
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/core/java/android/webkit/PermissionRequest.java b/core/java/android/webkit/PermissionRequest.java
index 18ec334d0283..ac145b1d81a5 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 95fe963d7891..4db630808ef1 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: + *

    + *
  1. Build an intent using {@link #createIntent}
  2. + *
  3. Fire the intent using {@link android.app.Activity#startActivityForResult}.
  4. + *
  5. Check for ActivityNotFoundException and take a user friendly action if thrown.
  6. + *
  7. Listen the result using {@link android.app.Activity#onActivityResult}
  8. + *
  9. Parse the result using {@link #parseResult} only if media capture was not + * requested.
  10. + *
  11. Send the result using filePathCallback of {@link + * WebChromeClient#onShowFileChooser}
  12. + *
* * @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 14be73dec41c..aed6c9c3ab6a 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -759,7 +759,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: - *
+     * 
      * String unencodedHtml =
      *     "<html><body>'%28' is the code for '('</body></html>";
      * String encodedHtml = Base64.encodeToString(unencodedHtml.getBytes(), Base64.NO_PADDING);
@@ -1851,7 +1851,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"; }
-- 
cgit v1.2.3-59-g8ed1b