summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wei <markwei@google.com>2013-11-06 14:25:37 -0800
committerMark Wei <markwei@google.com>2013-11-06 14:27:36 -0800
commitb809a47b9f2a5dd1b6237000b525060fea21fafa (patch)
treeb16a3a0a48de94ebeb9e9a959ddc095501c44bbd
parent41af50eb1ac488572b066629c3954b23c21dfa76 (diff)
downloadbitmap-b809a47b9f2a5dd1b6237000b525060fea21fafa.tar.gz
Add javadoc explaining when to implement async FD vs sync IS methods.
Change-Id: I8a5e739c14d357b0b6b724cdbff45cd116458660
-rw-r--r--src/com/android/bitmap/RequestKey.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/bitmap/RequestKey.java b/src/com/android/bitmap/RequestKey.java
index d9c15ae..adf1d72 100644
--- a/src/com/android/bitmap/RequestKey.java
+++ b/src/com/android/bitmap/RequestKey.java
@@ -70,6 +70,9 @@ public interface RequestKey {
* the given callback. This method will be called first; if it returns null,
* {@link #createInputStream()} will be called.
*
+ * Clients should implement this method if files are in the local cache folder, or if files must
+ * be downloaded and cached.
+ *
* This method must be called from the UI thread.
*
* @param key The key to create a FileDescriptorFactory for. This key will be passed to the
@@ -89,6 +92,9 @@ public interface RequestKey {
* Create an {@link InputStream} for the source. This method will be called if
* {@link #createFileDescriptorFactoryAsync(RequestKey, Callback)} returns null.
*
+ * Clients should implement this method if files exist in the assets/ folder, or for prototypes
+ * that open a connection directly on a URL (be warned that this will cause GCs).
+ *
* This method can be called from any thread.
*/
public InputStream createInputStream() throws IOException;