diff --git a/app/build.gradle b/app/build.gradle index 20d3136..7bbf932 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,9 +9,9 @@ android { defaultConfig { applicationId "eu.neilalexander.yggdrasil" minSdkVersion 21 - targetSdkVersion 33 - versionCode 18 - versionName "0.1-018" + targetSdkVersion 34 + versionCode 19 + versionName "0.1-019" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -51,12 +51,12 @@ android { dependencies { implementation fileTree(include: ['*.aar'], dir: 'libs') implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'androidx.core:core-ktx:1.12.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.5.0' + implementation 'androidx.core:core-ktx:1.13.1' + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.preference:preference-ktx:1.2.1' - testImplementation 'junit:junit:4.+' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c91724e..ebf9dd1 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -6,6 +6,7 @@ + diff --git a/app/src/main/java/eu/neilalexander/yggdrasil/MainActivity.kt b/app/src/main/java/eu/neilalexander/yggdrasil/MainActivity.kt index d1cd613..bc5f716 100644 --- a/app/src/main/java/eu/neilalexander/yggdrasil/MainActivity.kt +++ b/app/src/main/java/eu/neilalexander/yggdrasil/MainActivity.kt @@ -68,6 +68,7 @@ class MainActivity : AppCompatActivity() { startVpnActivity.launch(vpnIntent) } else { start() + enabledSwitch.isEnabled = false } } false -> { @@ -181,6 +182,9 @@ class MainActivity : AppCompatActivity() { else -> getString(R.string.main_many_peers, count) } } + if (!enabledSwitch.isEnabled) { + enabledSwitch.isEnabled = true + } } } } diff --git a/app/src/main/java/eu/neilalexander/yggdrasil/PacketTunnelProvider.kt b/app/src/main/java/eu/neilalexander/yggdrasil/PacketTunnelProvider.kt index c5519f6..aa84803 100644 --- a/app/src/main/java/eu/neilalexander/yggdrasil/PacketTunnelProvider.kt +++ b/app/src/main/java/eu/neilalexander/yggdrasil/PacketTunnelProvider.kt @@ -232,7 +232,11 @@ open class PacketTunnelProvider: VpnService() { } private fun updater() { - Thread.sleep(500) + try { + Thread.sleep(500) + } catch (_: InterruptedException) { + return + } var lastStateUpdate = System.currentTimeMillis() updates@ while (started.get()) { val treeJSON = yggdrasil.treeJSON diff --git a/build.gradle b/build.gradle index f6f831d..2f8ae41 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.9.10' + ext.kotlin_version = '1.9.20' repositories { google() mavenCentral() diff --git a/libs/yggdrasil-go b/libs/yggdrasil-go index 947b6ad..0b9c8bd 160000 --- a/libs/yggdrasil-go +++ b/libs/yggdrasil-go @@ -1 +1 @@ -Subproject commit 947b6ad7aa93eb2174bf16ddac844c7afaf2677d +Subproject commit 0b9c8bd020f971847604e7e1f0e0cfc66e65da49