diff options
author | Mark Wei <markwei@google.com> | 2013-11-06 14:25:37 -0800 |
---|---|---|
committer | Mark Wei <markwei@google.com> | 2013-11-06 14:27:36 -0800 |
commit | b809a47b9f2a5dd1b6237000b525060fea21fafa (patch) | |
tree | b16a3a0a48de94ebeb9e9a959ddc095501c44bbd /src/com/android | |
parent | 41af50eb1ac488572b066629c3954b23c21dfa76 (diff) | |
download | bitmap-b809a47b9f2a5dd1b6237000b525060fea21fafa.tar.gz |
Add javadoc explaining when to implement async FD vs sync IS methods.
Change-Id: I8a5e739c14d357b0b6b724cdbff45cd116458660
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/bitmap/RequestKey.java | 6 |
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; |