chore: Try to set backup creator to foreground for manual backup

This commit is contained in:
Ahmad Ansori Palembani 2024-10-07 11:36:50 +07:00
parent 54fdec2fc3
commit c2f07fbfc0
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -48,9 +48,12 @@ class BackupCreatorJob(private val context: Context, workerParams: WorkerParamet
?: getAutomaticBackupLocation()
?: return Result.failure()
// FIXME: tryToSetForeground keep causing auto backup to fail
notifier.showBackupProgress() // Remove when tryToSetForeground is "fixed"
// tryToSetForeground()
if (isAutoBackup) {
notifier.showBackupProgress() // Remove when tryToSetForeground is "fixed"
} else {
// FIXME: tryToSetForeground keep causing auto backup to fail
tryToSetForeground()
}
val options = inputData.getBooleanArray(BACKUP_FLAGS_KEY)?.let { BackupOptions.fromBooleanArray(it) }
?: BackupOptions()