-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImageLoader.loadImageSync() does not load images to cache #636
Labels
Comments
You're right, there is a problem. Thanks. |
i hava some question, method: public File get(String imageUri)
{
DiskLruCache.Snapshot snapshot = null;
try {
snapshot = this.cache.get(getKey(imageUri));
return snapshot == null ? null : snapshot.getFile(0);
} catch (IOException e) {
L.e(e);
return null;
} finally {
if (snapshot != null)
snapshot.close();
}
} will throw nullpointexception when sdcard Contact is not good |
because this.cache is null |
Is this a question or a fact? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When trying to use
ImageLoader.loadImageSync()
to precache images, I noticed thatIOUtils.shouldStopLoading()
cancels downloads prematurely by way ofLoadAndDisplayImageTask.onBytesCopied()
which calls through toLoadAndDisplayImageTask.fireProgressEvent()
.I assume that
fireProgressEvent()
cancels because a progress listener doesn't make sense in a synchronous download, but of course that shouldn't cancel the entire download.I think the line
if (syncLoading || isTaskInterrupted() || isTaskNotActual()) return false;
would make more sense in
onBytesCopied()
than infireProgressEvent()
- or am I missing something?The text was updated successfully, but these errors were encountered: