Move notification logic out of LibraryUpdateService

This commit is contained in:
arkon
2020-05-10 18:14:43 -04:00
parent dd1b5c7ea7
commit 530daeaa3a
5 changed files with 286 additions and 265 deletions
@@ -70,11 +70,11 @@ class BackupCreateService : Service() {
override fun onCreate() {
super.onCreate()
notifier = BackupNotifier(this)
wakeLock = acquireWakeLock(javaClass.name)
startForeground(Notifications.ID_BACKUP_PROGRESS, notifier.showBackupProgress().build())
wakeLock = acquireWakeLock(javaClass.name)
}
override fun stopService(name: Intent?): Boolean {
@@ -124,11 +124,11 @@ class BackupRestoreService : Service() {
override fun onCreate() {
super.onCreate()
notifier = BackupNotifier(this)
wakeLock = acquireWakeLock(javaClass.name)
startForeground(Notifications.ID_RESTORE_PROGRESS, notifier.showRestoreProgress().build())
wakeLock = acquireWakeLock(javaClass.name)
}
override fun stopService(name: Intent?): Boolean {