Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bitfireAT/cert4android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicki Hirner <hirner@bitfire.at>2020-12-31 18:12:26 +0300
committerRicki Hirner <hirner@bitfire.at>2020-12-31 18:12:26 +0300
commit925d47e065c2d1d071cbb2df02e88758602929bd (patch)
tree4ead35793d630042e62f1413aa4eb443eabc8f24
parent0710fb57c1e39b810d5fecfa8dd8cb90dbea48e3 (diff)
Update dependencies
-rw-r--r--build.gradle8
-rw-r--r--src/main/java/at/bitfire/cert4android/CustomCertManager.kt11
2 files changed, 9 insertions, 10 deletions
diff --git a/build.gradle b/build.gradle
index dd473da..9583667 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,9 +1,9 @@
buildscript {
ext.versions = [
- kotlin: '1.4.10',
+ kotlin: '1.4.21',
dokka: '0.10.1',
- conscrypt: '2.5.0'
+ conscrypt: '2.5.1'
]
repositories {
@@ -12,7 +12,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.1.0'
+ classpath 'com.android.tools.build:gradle:4.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}"
}
@@ -75,5 +75,5 @@ dependencies {
androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:4.9.0'
- testImplementation 'junit:junit:4.13'
+ testImplementation 'junit:junit:4.13.1'
}
diff --git a/src/main/java/at/bitfire/cert4android/CustomCertManager.kt b/src/main/java/at/bitfire/cert4android/CustomCertManager.kt
index 4e5df4a..d0f7830 100644
--- a/src/main/java/at/bitfire/cert4android/CustomCertManager.kt
+++ b/src/main/java/at/bitfire/cert4android/CustomCertManager.kt
@@ -91,10 +91,9 @@ class CustomCertManager @JvmOverloads constructor(
}
}
- check(Looper.myLooper() != Looper.getMainLooper()) {
- // service is actually created after bindService() by code running in looper, so this would block
- "must not be run on main thread"
- }
+ if (Looper.myLooper() == Looper.getMainLooper())
+ // service is created after bindService() by code running in looper, so this would block
+ throw IllegalStateException("Must not be run in main thread")
Constants.log.fine("Binding to service")
if (context.bindService(Intent(context, CustomCertService::class.java), newServiceConn, Context.BIND_AUTO_CREATE)) {
@@ -116,10 +115,10 @@ class CustomCertManager @JvmOverloads constructor(
serviceConn?.let {
try {
context.unbindService(it)
- serviceConn = null
} catch (e: Exception) {
- Constants.log.log(Level.WARNING, "Couldn't unbind CustomCertService", e)
+ Constants.log.log(Level.FINE, "Couldn't unbind CustomCertService", e)
}
+ serviceConn = null
}
}