mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix(backup/restore): Avoid starting restore job when it's already
running
This commit is contained in:
parent
8b5c065d8a
commit
81a034db1a
1 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,8 @@ class BackupRestoreJob(val context: Context, workerParams: WorkerParameters) : C
|
|||
}
|
||||
|
||||
override suspend fun doWork(): Result {
|
||||
if (isRunning(context)) return Result.failure()
|
||||
|
||||
tryToSetForeground()
|
||||
|
||||
val uriPath = inputData.getString(BackupConst.EXTRA_URI) ?: return Result.failure()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue