|
|
@ -160,9 +160,9 @@ class BackupRestoreService : Service() {
|
|
|
|
* @return the start value of the command.
|
|
|
|
* @return the start value of the command.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
|
|
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
|
|
|
if (intent == null) return Service.START_NOT_STICKY
|
|
|
|
if (intent == null) return START_NOT_STICKY
|
|
|
|
|
|
|
|
|
|
|
|
val uri = intent.getParcelableExtra<Uri>(BackupConst.EXTRA_URI)
|
|
|
|
val uri = intent.getParcelableExtra<Uri>(BackupConst.EXTRA_URI) ?: return START_NOT_STICKY
|
|
|
|
|
|
|
|
|
|
|
|
// Unsubscribe from any previous subscription if needed.
|
|
|
|
// Unsubscribe from any previous subscription if needed.
|
|
|
|
subscription?.unsubscribe()
|
|
|
|
subscription?.unsubscribe()
|
|
|
@ -175,7 +175,7 @@ class BackupRestoreService : Service() {
|
|
|
|
.subscribeOn(Schedulers.from(executor))
|
|
|
|
.subscribeOn(Schedulers.from(executor))
|
|
|
|
.subscribe()
|
|
|
|
.subscribe()
|
|
|
|
|
|
|
|
|
|
|
|
return Service.START_NOT_STICKY
|
|
|
|
return START_NOT_STICKY
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|