diff options
author | Allan Wang <me@allanwang.ca> | 2017-09-18 10:43:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-18 10:43:55 -0400 |
commit | d75ad7fb42aba81b334f9453c012f04c3d5f3e0a (patch) | |
tree | 9dfd08dd48325ae7f813a4cfa43ec5629662db79 /app/src/main/kotlin/com/pitchedapps/frost/services/DownloadService.kt | |
parent | 5ae7fd03522dd2c2843ff522314ab1d20f85d391 (diff) | |
download | frost-d75ad7fb42aba81b334f9453c012f04c3d5f3e0a.tar.gz frost-d75ad7fb42aba81b334f9453c012f04c3d5f3e0a.tar.bz2 frost-d75ad7fb42aba81b334f9453c012f04c3d5f3e0a.zip |
Fix/notification defaults (#308)
* Update downloader
* Disable deaults on creation
* Use notifCount rather than index
* Remove quiet
* Add checks to ensure job service exists
* Update changelog
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/services/DownloadService.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/services/DownloadService.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/DownloadService.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/DownloadService.kt index ee0c2027..986467b8 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/DownloadService.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/DownloadService.kt @@ -28,6 +28,8 @@ import java.io.File * * Background file downloader * All we are given is a link and a mime type + * + * With reference to the <a href="https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/Progress.java">OkHttp3 sample</a> */ class DownloadService : IntentService("FrostVideoDownloader") { @@ -64,7 +66,7 @@ class DownloadService : IntentService("FrostVideoDownloader") { .url(url) .build() - notifBuilder = frostNotification.quiet + notifBuilder = frostNotification notifId = Math.abs(url.hashCode() + System.currentTimeMillis().toInt()) val cancelIntent = PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT) |