diff --git a/build.gradle.kts b/build.gradle.kts index b5805d97..3c86daa0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,7 @@ plugins { } buildscript { - val kotlinVersion = "1.3.72" + val kotlinVersion = "1.4.0" extra.set("kotlinVersion", kotlinVersion) repositories { diff --git a/detekt.yml b/detekt.yml index aed2bb8e..86953877 100644 --- a/detekt.yml +++ b/detekt.yml @@ -248,10 +248,8 @@ formatting: autoCorrect: true SpacingBetweenDeclarationsWithAnnotations: active: false - autoCorrect: true SpacingBetweenDeclarationsWithComments: active: false - autoCorrect: true StringTemplate: active: true autoCorrect: true diff --git a/mobile/build.gradle.kts b/mobile/build.gradle.kts index 589d1cbc..2f055639 100644 --- a/mobile/build.gradle.kts +++ b/mobile/build.gradle.kts @@ -11,7 +11,7 @@ plugins { android { val javaVersion = JavaVersion.VERSION_1_8 val targetSdk = 29 - buildToolsVersion("30.0.1") + buildToolsVersion("30.0.2") compileOptions { isCoreLibraryDesugaringEnabled = true sourceCompatibility = javaVersion @@ -94,7 +94,7 @@ dependencies { implementation("com.linkedin.dexmaker:dexmaker:2.28.0") implementation("com.takisoft.preferencex:preferencex-simplemenu:1.1.0") implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.2") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.8") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9") testImplementation("junit:junit:4.13") androidTestImplementation("androidx.room:room-testing:$roomVersion") androidTestImplementation("androidx.test:runner:1.2.0") diff --git a/mobile/src/main/java/be/mygod/librootkotlinx/RootServer.kt b/mobile/src/main/java/be/mygod/librootkotlinx/RootServer.kt index dee418cc..d6df27e1 100644 --- a/mobile/src/main/java/be/mygod/librootkotlinx/RootServer.kt +++ b/mobile/src/main/java/be/mygod/librootkotlinx/RootServer.kt @@ -441,7 +441,8 @@ class RootServer { val result = command.execute(); { output.pushResult(callback, result) } } catch (e: Throwable) { - { output.pushThrowable(callback, e) } + val worker = { output.pushThrowable(callback, e) } + worker } finally { cancellables.remove(callback) } @@ -463,7 +464,8 @@ class RootServer { output.flush() } } catch (e: Throwable) { - { output.pushThrowable(callback, e) } + val worker = { output.pushThrowable(callback, e) } + worker } finally { cancellables.remove(callback) } diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt b/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt index 2e10aa1c..bec59e21 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt @@ -195,7 +195,6 @@ sealed class TetherManager(protected val parent: TetheringFragment) : Manager(), var features = supportedFeatures if (features == 0L) yield(parent.getString(R.string.tethering_manage_wifi_no_features)) else while (features != 0L) { - @OptIn(ExperimentalStdlibApi::class) val bit = features.takeLowestOneBit() yield(WifiApManager.featureLookup(bit, true)) features = features and bit.inv() diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/root/WifiApCommands.kt b/mobile/src/main/java/be/mygod/vpnhotspot/root/WifiApCommands.kt index d8887991..f1bf27f6 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/root/WifiApCommands.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/root/WifiApCommands.kt @@ -63,7 +63,7 @@ object WifiApCommands { @Parcelize @RequiresApi(28) class RegisterSoftApCallback : RootCommandChannel { - override fun create(scope: CoroutineScope) = scope.produce(capacity = capacity) { + override fun create(scope: CoroutineScope) = scope.produce(capacity = capacity) { val finish = CompletableDeferred() val key = WifiApManager.registerSoftApCallback(object : WifiApManager.SoftApCallbackCompat { private fun push(parcel: SoftApCallbackParcel) = check(try {