Loading app/build.gradle +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ android { defaultConfig { applicationId "at.bitfire.davdroid" versionCode 244 versionCode 245 buildConfigField "long", "buildTime", System.currentTimeMillis() + "L" buildConfigField "boolean", "customCerts", "true" Loading @@ -32,7 +32,7 @@ android { flavorDimensions "type" productFlavors { standard { versionName "2.0.3-ose" versionName "2.0.4-ose" buildConfigField "boolean", "customCerts", "true" } Loading app/src/main/java/at/bitfire/davdroid/ui/setup/DavResourceFinder.kt +18 −8 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import org.xbill.DNS.Lookup import org.xbill.DNS.Type import java.io.IOException import java.io.InterruptedIOException import java.net.SocketTimeoutException import java.net.URI import java.net.URISyntaxException import java.util.* Loading Loading @@ -70,16 +71,25 @@ class DavResourceFinder( * exception, but return an empty Configuration with error logs instead. */ fun findInitialConfiguration(): Configuration { var cardDavConfig: Configuration.ServiceInfo? var calDavConfig: Configuration.ServiceInfo? var cardDavConfig: Configuration.ServiceInfo? = null var calDavConfig: Configuration.ServiceInfo? = null try { try { cardDavConfig = findInitialConfiguration(Service.CARDDAV) calDavConfig = findInitialConfiguration(Service.CALDAV) } catch (e: Exception) { log.log(Level.INFO, "Service detection failed", e) log.log(Level.INFO, "CardDAV service detection failed", e) rethrowIfInterrupted(e) } // reset results so that an error message will be shown try { calDavConfig = findInitialConfiguration(Service.CALDAV) } catch (e: Exception) { log.log(Level.INFO, "CalDAV service detection failed", e) rethrowIfInterrupted(e) } } catch(e: Exception) { // we have been interrupted; reset results so that an error message will be shown cardDavConfig = null calDavConfig = null } Loading Loading @@ -400,7 +410,7 @@ class DavResourceFinder( * to stop the current operation. */ private fun rethrowIfInterrupted(e: Exception) { if (e is InterruptedIOException || e is InterruptedException) if ((e is InterruptedIOException && e !is SocketTimeoutException) || e is InterruptedException) throw e } Loading Loading
app/build.gradle +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ android { defaultConfig { applicationId "at.bitfire.davdroid" versionCode 244 versionCode 245 buildConfigField "long", "buildTime", System.currentTimeMillis() + "L" buildConfigField "boolean", "customCerts", "true" Loading @@ -32,7 +32,7 @@ android { flavorDimensions "type" productFlavors { standard { versionName "2.0.3-ose" versionName "2.0.4-ose" buildConfigField "boolean", "customCerts", "true" } Loading
app/src/main/java/at/bitfire/davdroid/ui/setup/DavResourceFinder.kt +18 −8 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import org.xbill.DNS.Lookup import org.xbill.DNS.Type import java.io.IOException import java.io.InterruptedIOException import java.net.SocketTimeoutException import java.net.URI import java.net.URISyntaxException import java.util.* Loading Loading @@ -70,16 +71,25 @@ class DavResourceFinder( * exception, but return an empty Configuration with error logs instead. */ fun findInitialConfiguration(): Configuration { var cardDavConfig: Configuration.ServiceInfo? var calDavConfig: Configuration.ServiceInfo? var cardDavConfig: Configuration.ServiceInfo? = null var calDavConfig: Configuration.ServiceInfo? = null try { try { cardDavConfig = findInitialConfiguration(Service.CARDDAV) calDavConfig = findInitialConfiguration(Service.CALDAV) } catch (e: Exception) { log.log(Level.INFO, "Service detection failed", e) log.log(Level.INFO, "CardDAV service detection failed", e) rethrowIfInterrupted(e) } // reset results so that an error message will be shown try { calDavConfig = findInitialConfiguration(Service.CALDAV) } catch (e: Exception) { log.log(Level.INFO, "CalDAV service detection failed", e) rethrowIfInterrupted(e) } } catch(e: Exception) { // we have been interrupted; reset results so that an error message will be shown cardDavConfig = null calDavConfig = null } Loading Loading @@ -400,7 +410,7 @@ class DavResourceFinder( * to stop the current operation. */ private fun rethrowIfInterrupted(e: Exception) { if (e is InterruptedIOException || e is InterruptedException) if ((e is InterruptedIOException && e !is SocketTimeoutException) || e is InterruptedException) throw e } Loading