mitmel/Android-Image-Cache — pull request #6 by eschlenz (2012-09-19 16:38:34+00:00)
Title: Two separate updates to ImageCache class.

Hey Steve,

I have made two commits that I would like you to consider pulling in.

The first commit simply opens up access to the CompressFormat and quality via setters. This is fundamentally what I needed, but it might be nice in the future to allow such options to be associated with each image request job.

The second commit implements the cancelAll, and introduces a cancel(id). The cancelAll implementation should prevent any queued jobs from running. Unfortunately, any currently running jobs will still finish execution. This is mainly due to the fact that halting of IO data is not possible in its current state, due to the delegation of the work from the Runnable to getImage(). In the future it would be good to make the job truly interruptible (ie: kill IO). A job that finishes execution, but was cancelled, will not fire a message to the handler. This should eliminate issues with notifications on cancelled jobs.

I hope to contribute more soon, and hope you can incorporate these changes!

P.S. Sorry this work was not done in a topic branch. This is the first time I've done this, and missed that part of the guide until after the commits were performed.

Eric