diff options
Diffstat (limited to 'src/com/android/bitmap/RequestKey.java')
-rw-r--r-- | src/com/android/bitmap/RequestKey.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/com/android/bitmap/RequestKey.java b/src/com/android/bitmap/RequestKey.java index 882c75b..933f61f 100644 --- a/src/com/android/bitmap/RequestKey.java +++ b/src/com/android/bitmap/RequestKey.java @@ -67,8 +67,10 @@ public interface RequestKey { /** * Create an {@link FileDescriptorFactory} for a local file stored on the device and pass it to - * the given callback. This method will be called first; if it returns null, - * {@link #createInputStream()} will be called. + * the given callback. This method will be called in favor of {@link #createInputStream()}}, + * which will only be called if null is returned from this method, + * or {@link Callback#fileDescriptorFactoryCreated(RequestKey, FileDescriptorFactory)} is called + * with a null FileDescriptorFactory. * * Clients should implement this method if files are in the local cache folder, or if files must * be downloaded and cached. @@ -77,8 +79,9 @@ public interface RequestKey { * * @param key The key to create a FileDescriptorFactory for. This key will be passed to the * callback so it can check whether the key has changed. - * @param callback The callback to notify once the FileDescriptorFactory has been created. Do - * not invoke the callback directly from this method. Instead, create a handler + * @param callback The callback to notify once the FileDescriptorFactory is created or has failed + * to be created. + * Do not invoke the callback directly from this method. Instead, create a handler * and post a Runnable. * * @return If the client will attempt to create a FileDescriptorFactory, return a Cancelable @@ -136,4 +139,4 @@ public interface RequestKey { */ void cancel(); } -}
\ No newline at end of file +} |