mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 10:27:39 +00:00
Show notification on error
This commit is contained in:
parent
85f5ff3c14
commit
0e9b71e7a9
@ -49,7 +49,11 @@ abstract class RemoteFileService : NotificationService() {
|
|||||||
.doOnSubscribe { update(subject.hashCode()) { it.setContentTitle(subject.title) } }
|
.doOnSubscribe { update(subject.hashCode()) { it.setContentTitle(subject.title) } }
|
||||||
.subscribeK(onError = {
|
.subscribeK(onError = {
|
||||||
Timber.e(it)
|
Timber.e(it)
|
||||||
remove(subject.hashCode())
|
finishNotify(subject.hashCode()) { notification ->
|
||||||
|
notification.setContentText(getString(R.string.download_file_error))
|
||||||
|
.setSmallIcon(android.R.drawable.stat_notify_error)
|
||||||
|
.setOngoing(false)
|
||||||
|
}
|
||||||
}) {
|
}) {
|
||||||
val newId = finishNotify(it, subject)
|
val newId = finishNotify(it, subject)
|
||||||
get<Activity?>()?.run {
|
get<Activity?>()?.run {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user