diff options
| author | James Wallace-Lee <jamwalla@google.com> | 2017-12-14 18:40:12 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-12-14 18:40:12 +0000 |
| commit | 10adc355824dea8a6428aefb2bd4f5bedca439ef (patch) | |
| tree | 16ee22e868f2f9825706b0d15fdaadb2dd18d705 /core/java/android/webkit/WebView.java | |
| parent | 7d6688f35e37a96579db8ae2342eda3239a92c3c (diff) | |
| parent | d38c2e3f344d07fc948df8c49bfbf3e9219f5474 (diff) | |
Merge "WebView: Clarify documentation about mimeTypes"
Diffstat (limited to 'core/java/android/webkit/WebView.java')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index d39c1e18b2ac..e9859239fdd6 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -997,6 +997,10 @@ public class WebView extends AbsoluteLayout * hex encoding of URLs for octets outside that range. For example, '#', * '%', '\', '?' should be replaced by %23, %25, %27, %3f respectively. * <p> + * The {@code mimeType} parameter specifies the format of the data. + * If WebView can't handle the specified MIME type, it will download the data. + * If {@code null}, defaults to 'text/html'. + * <p> * The 'data' scheme URL formed by this method uses the default US-ASCII * charset. If you need need to set a different charset, you should form a * 'data' scheme URL which explicitly specifies a charset parameter in the @@ -1005,8 +1009,7 @@ public class WebView extends AbsoluteLayout * always overrides that specified in the HTML or XML document itself. * * @param data a String of data in the given encoding - * @param mimeType the MIMEType of the data, e.g. 'text/html'. If {@code null}, - * defaults to 'text/html'. + * @param mimeType the MIME type of the data, e.g. 'text/html'. * @param encoding the encoding of the data */ public void loadData(String data, @Nullable String mimeType, @Nullable String encoding) { @@ -1020,6 +1023,10 @@ public class WebView extends AbsoluteLayout * applying JavaScript's same origin policy. The historyUrl is used for the * history entry. * <p> + * The {@code mimeType} parameter specifies the format of the data. + * If WebView can't handle the specified MIME type, it will download the data. + * If {@code null}, defaults to 'text/html'. + * <p> * Note that content specified in this way can access local device files * (via 'file' scheme URLs) only if baseUrl specifies a scheme other than * 'http', 'https', 'ftp', 'ftps', 'about' or 'javascript'. @@ -1037,8 +1044,7 @@ public class WebView extends AbsoluteLayout * @param baseUrl the URL to use as the page's base URL. If {@code null} defaults to * 'about:blank'. * @param data a String of data in the given encoding - * @param mimeType the MIMEType of the data, e.g. 'text/html'. If {@code null}, - * defaults to 'text/html'. + * @param mimeType the MIME type of the data, e.g. 'text/html'. * @param encoding the encoding of the data * @param historyUrl the URL to use as the history entry. If {@code null} defaults * to 'about:blank'. If non-null, this must be a valid URL. |
