This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Tracks download of a DownloadManager job and reports progress. | |
*/ | |
internal class DownloadProgressUpdater(private val manager: DownloadManager, private val downloadId: Long, private var downloadProgressListener: DownloadProgressListener?) : Thread() { | |
private val query: DownloadManager.Query = DownloadManager.Query() | |
private var totalBytes: Int = 0 | |
interface DownloadProgressListener { | |
fun updateProgress(progress: Long) | |
} |