diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/worker/WorkManagerUtil.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/worker/WorkManagerUtil.kt index fa1d22a162..ea0ff28293 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/worker/WorkManagerUtil.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/worker/WorkManagerUtil.kt @@ -22,17 +22,22 @@ import androidx.work.* internal object WorkManagerUtil { private const val MATRIX_SDK_TAG = "MatrixSDK" - // Default constraints: network + /** + * Default constraints: connected network + */ val workConstraints = Constraints.Builder() .setRequiredNetworkType(NetworkType.CONNECTED) .build() + /** + * Create a OneTimeWorkRequestBuilder, with the Matrix SDK tag + */ inline fun matrixOneTimeWorkRequestBuilder() = OneTimeWorkRequestBuilder() .addTag(MATRIX_SDK_TAG) /** - * Cancel all work instanciated by the Matrix SDK and not those from the SDK client + * Cancel all works instantiated by the Matrix SDK and not those from the SDK client */ fun cancelAllWorks(context: Context) { WorkManager.getInstance(context).also {