using start_redeliver_intent to allow the system to restart killed sync services

- memory restricted devices may have the sync service destroyed whilst in progress causing future sync to no longer be scheduled
This commit is contained in:
Adam Brown 2021-10-22 12:09:13 +01:00
parent ace9f89569
commit b1afc26d65
1 changed files with 2 additions and 3 deletions

View File

@ -105,9 +105,8 @@ abstract class SyncService : Service() {
}
}
}
// It's ok to be not sticky because we will explicitly start it again on the next alarm?
return START_NOT_STICKY
// Attempt to continue scheduling syncs after killed service is restarted
return START_REDELIVER_INTENT
}
override fun onDestroy() {