Skip to content

Commit

Permalink
Remove deprecated SyncWorkerManager.syncAuthorities
Browse files Browse the repository at this point in the history
  • Loading branch information
rfc2822 committed Dec 26, 2024
1 parent 294073e commit 77093e1
Showing 1 changed file with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import androidx.work.WorkInfo
import androidx.work.WorkManager
import androidx.work.WorkQuery
import androidx.work.WorkRequest
import at.bitfire.davdroid.R
import at.bitfire.davdroid.push.PushNotificationManager
import at.bitfire.davdroid.sync.SyncDataType
import at.bitfire.davdroid.sync.TasksAppManager
Expand Down Expand Up @@ -284,30 +283,4 @@ class SyncWorkerManager @Inject constructor(
}
}

/**
* Returns a list of all available sync authorities:
*
* 1. calendar authority
* 2. address books authority
* 3. current tasks authority (if available)
*
* Checking the availability of authorities may be relatively expensive, so the
* result should be cached for the current operation.
*
* @return list of available sync authorities for DAVx5 accounts
*/
@Deprecated("Use SyncDataType.entries instead")
fun syncAuthorities(): List<String> {
val result = mutableListOf(
CalendarContract.AUTHORITY,
context.getString(R.string.address_books_authority)
)

tasksAppManager.get().currentProvider()?.let { taskProvider ->
result += taskProvider.authority
}

return result
}

}

0 comments on commit 77093e1

Please sign in to comment.