Update dependencies

This commit is contained in:
Mygod
2020-08-18 04:20:50 +08:00
parent 1b1fe33884
commit 2989094efd
6 changed files with 8 additions and 9 deletions

View File

@@ -3,7 +3,7 @@ plugins {
} }
buildscript { buildscript {
val kotlinVersion = "1.3.72" val kotlinVersion = "1.4.0"
extra.set("kotlinVersion", kotlinVersion) extra.set("kotlinVersion", kotlinVersion)
repositories { repositories {

View File

@@ -248,10 +248,8 @@ formatting:
autoCorrect: true autoCorrect: true
SpacingBetweenDeclarationsWithAnnotations: SpacingBetweenDeclarationsWithAnnotations:
active: false active: false
autoCorrect: true
SpacingBetweenDeclarationsWithComments: SpacingBetweenDeclarationsWithComments:
active: false active: false
autoCorrect: true
StringTemplate: StringTemplate:
active: true active: true
autoCorrect: true autoCorrect: true

View File

@@ -11,7 +11,7 @@ plugins {
android { android {
val javaVersion = JavaVersion.VERSION_1_8 val javaVersion = JavaVersion.VERSION_1_8
val targetSdk = 29 val targetSdk = 29
buildToolsVersion("30.0.1") buildToolsVersion("30.0.2")
compileOptions { compileOptions {
isCoreLibraryDesugaringEnabled = true isCoreLibraryDesugaringEnabled = true
sourceCompatibility = javaVersion sourceCompatibility = javaVersion
@@ -94,7 +94,7 @@ dependencies {
implementation("com.linkedin.dexmaker:dexmaker:2.28.0") implementation("com.linkedin.dexmaker:dexmaker:2.28.0")
implementation("com.takisoft.preferencex:preferencex-simplemenu:1.1.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-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") testImplementation("junit:junit:4.13")
androidTestImplementation("androidx.room:room-testing:$roomVersion") androidTestImplementation("androidx.room:room-testing:$roomVersion")
androidTestImplementation("androidx.test:runner:1.2.0") androidTestImplementation("androidx.test:runner:1.2.0")

View File

@@ -441,7 +441,8 @@ class RootServer {
val result = command.execute(); val result = command.execute();
{ output.pushResult(callback, result) } { output.pushResult(callback, result) }
} catch (e: Throwable) { } catch (e: Throwable) {
{ output.pushThrowable(callback, e) } val worker = { output.pushThrowable(callback, e) }
worker
} finally { } finally {
cancellables.remove(callback) cancellables.remove(callback)
} }
@@ -463,7 +464,8 @@ class RootServer {
output.flush() output.flush()
} }
} catch (e: Throwable) { } catch (e: Throwable) {
{ output.pushThrowable(callback, e) } val worker = { output.pushThrowable(callback, e) }
worker
} finally { } finally {
cancellables.remove(callback) cancellables.remove(callback)
} }

View File

@@ -195,7 +195,6 @@ sealed class TetherManager(protected val parent: TetheringFragment) : Manager(),
var features = supportedFeatures var features = supportedFeatures
if (features == 0L) yield(parent.getString(R.string.tethering_manage_wifi_no_features)) if (features == 0L) yield(parent.getString(R.string.tethering_manage_wifi_no_features))
else while (features != 0L) { else while (features != 0L) {
@OptIn(ExperimentalStdlibApi::class)
val bit = features.takeLowestOneBit() val bit = features.takeLowestOneBit()
yield(WifiApManager.featureLookup(bit, true)) yield(WifiApManager.featureLookup(bit, true))
features = features and bit.inv() features = features and bit.inv()

View File

@@ -63,7 +63,7 @@ object WifiApCommands {
@Parcelize @Parcelize
@RequiresApi(28) @RequiresApi(28)
class RegisterSoftApCallback : RootCommandChannel<SoftApCallbackParcel> { class RegisterSoftApCallback : RootCommandChannel<SoftApCallbackParcel> {
override fun create(scope: CoroutineScope) = scope.produce(capacity = capacity) { override fun create(scope: CoroutineScope) = scope.produce<SoftApCallbackParcel>(capacity = capacity) {
val finish = CompletableDeferred<Unit>() val finish = CompletableDeferred<Unit>()
val key = WifiApManager.registerSoftApCallback(object : WifiApManager.SoftApCallbackCompat { val key = WifiApManager.registerSoftApCallback(object : WifiApManager.SoftApCallbackCompat {
private fun push(parcel: SoftApCallbackParcel) = check(try { private fun push(parcel: SoftApCallbackParcel) = check(try {