« Previous | Next » 

Revision 0e0e042c

Parent 91f2f101
Child 3ed2cde2

Added by Peter Serwylo over 3 years ago

Change DownloadHandler from using runOnUiThread() to send/handleMessage().

It still executes the download on another thread, and receives progress
events on that thread. However it now posts those events to the main UI
thread for them to get handled.

Also refactored Downloader/HttpDownloader a tad further. Some caching
stuff was pushed down from HttpDownloader -> Downloader (renamed from
eTag to just cacheTag). HttpDownloader.download() was recursively calling
itself, so I made the base class download() method abstract, and instead
the stream downloading is done in "protected void downloadFromStream()"

Other minor stuff: * Prefixed some log TAGs with package names, to make them easier to grep. * Removed a little bit of unused code (parameter to DownloadHandler).


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences