chore: Testing setToForeground on auto backup (again)

This commit is contained in:
Ahmad Ansori Palembani 2024-11-14 09:13:21 +07:00
parent 231ece7bfb
commit dceac33b7c
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

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