Loading app/src/main/kotlin/at/bitfire/davdroid/servicedetection/RefreshCollectionsWorker.kt +26 −11 Original line number Diff line number Diff line Loading @@ -37,8 +37,11 @@ import dagger.assisted.AssistedInject import foundation.e.accountmanager.AccountTypes import kotlinx.coroutines.flow.map import kotlinx.coroutines.runInterruptible import java.io.IOException import java.io.InterruptedIOException import java.util.logging.Level import java.util.logging.Logger import kotlin.coroutines.cancellation.CancellationException /** * Refreshes list of home sets and their respective collections of a service type (CardDAV or CalDAV). Loading Loading @@ -193,18 +196,30 @@ class RefreshCollectionsWorker @AssistedInject constructor( ) return Result.failure() } catch (e: Exception) { when (e) { is CancellationException -> throw e is IOException -> { logger.log(Level.WARNING, "I/O issue while refreshing collection list", e) return Result.failure() } else -> { logger.log(Level.SEVERE, "Couldn't refresh collection list", e) val debugIntent = DebugInfoActivity.IntentBuilder(applicationContext) .withCause(e) .withAccount(account) .build() notifyRefreshError( applicationContext.getString(R.string.refresh_collections_worker_refresh_couldnt_refresh), debugIntent ) return Result.failure() } } } // update push registrations pushRegistrationManager.update(serviceId) Loading Loading
app/src/main/kotlin/at/bitfire/davdroid/servicedetection/RefreshCollectionsWorker.kt +26 −11 Original line number Diff line number Diff line Loading @@ -37,8 +37,11 @@ import dagger.assisted.AssistedInject import foundation.e.accountmanager.AccountTypes import kotlinx.coroutines.flow.map import kotlinx.coroutines.runInterruptible import java.io.IOException import java.io.InterruptedIOException import java.util.logging.Level import java.util.logging.Logger import kotlin.coroutines.cancellation.CancellationException /** * Refreshes list of home sets and their respective collections of a service type (CardDAV or CalDAV). Loading Loading @@ -193,18 +196,30 @@ class RefreshCollectionsWorker @AssistedInject constructor( ) return Result.failure() } catch (e: Exception) { when (e) { is CancellationException -> throw e is IOException -> { logger.log(Level.WARNING, "I/O issue while refreshing collection list", e) return Result.failure() } else -> { logger.log(Level.SEVERE, "Couldn't refresh collection list", e) val debugIntent = DebugInfoActivity.IntentBuilder(applicationContext) .withCause(e) .withAccount(account) .build() notifyRefreshError( applicationContext.getString(R.string.refresh_collections_worker_refresh_couldnt_refresh), debugIntent ) return Result.failure() } } } // update push registrations pushRegistrationManager.update(serviceId) Loading