summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebResourceResponse.java
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2019-05-14 09:52:26 -0700
committerXin Li <delphij@google.com>2019-05-15 11:31:45 -0700
commitc76d117d2a1f7087f91b5199b1cc238c46fbf678 (patch)
tree24a4ee65b4a5e539a933a1c6f4c3a1bc0c1d8dc0 /core/java/android/webkit/WebResourceResponse.java
parent3af50a60332f002e80e6b7df827ffb7bb04ffc9e (diff)
parent7c2cd6a19aab9492a7f3f5a5d27a889cc3e0580d (diff)
DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master
Bug: 132622481 Change-Id: I7ba1a9999b3a9bac8031dd086fa2632e45404f32
Diffstat (limited to 'core/java/android/webkit/WebResourceResponse.java')
-rw-r--r--core/java/android/webkit/WebResourceResponse.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/core/java/android/webkit/WebResourceResponse.java b/core/java/android/webkit/WebResourceResponse.java
index e66596b5c0e9..7c8f33e181d6 100644
--- a/core/java/android/webkit/WebResourceResponse.java
+++ b/core/java/android/webkit/WebResourceResponse.java
@@ -42,9 +42,9 @@ public class WebResourceResponse {
/**
* Constructs a resource response with the given MIME type, character encoding,
- * and input stream. Callers must implement
- * {@link InputStream#read(byte[]) InputStream.read(byte[])} for the input
- * stream.
+ * and input stream. Callers must implement {@link InputStream#read(byte[])} for
+ * the input stream. {@link InputStream#close()} will be called after the WebView
+ * has finished with the response.
*
* <p class="note"><b>Note:</b> The MIME type and character encoding must
* be specified as separate parameters (for example {@code "text/html"} and
@@ -67,9 +67,10 @@ public class WebResourceResponse {
}
/**
- * Constructs a resource response with the given parameters. Callers must
- * implement {@link InputStream#read(byte[]) InputStream.read(byte[])} for
- * the input stream.
+ * Constructs a resource response with the given parameters. Callers must implement
+ * {@link InputStream#read(byte[])} for the input stream. {@link InputStream#close()} will be
+ * called after the WebView has finished with the response.
+ *
*
* <p class="note"><b>Note:</b> See {@link #WebResourceResponse(String,String,InputStream)}
* for details on what should be specified for {@code mimeType} and {@code encoding}.
@@ -201,7 +202,8 @@ public class WebResourceResponse {
/**
* Sets the input stream that provides the resource response's data. Callers
- * must implement {@link InputStream#read(byte[]) InputStream.read(byte[])}.
+ * must implement {@link InputStream#read(byte[])}. {@link InputStream#close()}
+ * will be called after the WebView has finished with the response.
*
* @param data the input stream that provides the resource response's data. Must not be a
* StringBufferInputStream.