Skip to content

Commit cdc12a8

Browse files
authored
Prepare for release 0.5.9 (#68)
Updated the yggdrasil-go submodule. Fixed #64, updated some deps.
1 parent 34756b2 commit cdc12a8

File tree

6 files changed

+22
-12
lines changed

6 files changed

+22
-12
lines changed

app/build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ android {
99
defaultConfig {
1010
applicationId "eu.neilalexander.yggdrasil"
1111
minSdkVersion 21
12-
targetSdkVersion 33
13-
versionCode 18
14-
versionName "0.1-018"
12+
targetSdkVersion 34
13+
versionCode 19
14+
versionName "0.1-019"
1515

1616
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1717
}
@@ -51,12 +51,12 @@ android {
5151
dependencies {
5252
implementation fileTree(include: ['*.aar'], dir: 'libs')
5353
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
54-
implementation 'androidx.core:core-ktx:1.12.0'
55-
implementation 'androidx.appcompat:appcompat:1.6.1'
56-
implementation 'com.google.android.material:material:1.5.0'
54+
implementation 'androidx.core:core-ktx:1.13.1'
55+
implementation 'androidx.appcompat:appcompat:1.7.0'
56+
implementation 'com.google.android.material:material:1.12.0'
5757
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
5858
implementation 'androidx.preference:preference-ktx:1.2.1'
59-
testImplementation 'junit:junit:4.+'
60-
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
61-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
59+
testImplementation 'junit:junit:4.13.2'
60+
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
61+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
6262
}

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
77
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
88
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
9+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED" />
910

1011
<application
1112
android:name=".GlobalApplication"
@@ -42,6 +43,7 @@
4243
<service
4344
android:name=".PacketTunnelProvider"
4445
android:permission="android.permission.BIND_VPN_SERVICE"
46+
android:foregroundServiceType="systemExempted"
4547
android:exported="true">
4648
<intent-filter>
4749
<action android:name="android.net.VpnService" />

app/src/main/java/eu/neilalexander/yggdrasil/MainActivity.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class MainActivity : AppCompatActivity() {
6868
startVpnActivity.launch(vpnIntent)
6969
} else {
7070
start()
71+
enabledSwitch.isEnabled = false
7172
}
7273
}
7374
false -> {
@@ -181,6 +182,9 @@ class MainActivity : AppCompatActivity() {
181182
else -> getString(R.string.main_many_peers, count)
182183
}
183184
}
185+
if (!enabledSwitch.isEnabled) {
186+
enabledSwitch.isEnabled = true
187+
}
184188
}
185189
}
186190
}

app/src/main/java/eu/neilalexander/yggdrasil/PacketTunnelProvider.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,11 @@ open class PacketTunnelProvider: VpnService() {
232232
}
233233

234234
private fun updater() {
235-
Thread.sleep(500)
235+
try {
236+
Thread.sleep(500)
237+
} catch (_: InterruptedException) {
238+
return
239+
}
236240
var lastStateUpdate = System.currentTimeMillis()
237241
updates@ while (started.get()) {
238242
val treeJSON = yggdrasil.treeJSON

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
3-
ext.kotlin_version = '1.9.10'
3+
ext.kotlin_version = '1.9.20'
44
repositories {
55
google()
66
mavenCentral()

0 commit comments

Comments
 (0)