Skip to content

Commit

Permalink
Updated the yggdrasil-go submodule. Fixed #64, updated some deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
Revertron committed Oct 23, 2024
1 parent 34756b2 commit 2b67079
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -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'
}
2 changes: 2 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED" />

<application
android:name=".GlobalApplication"
Expand Down Expand Up @@ -42,6 +43,7 @@
<service
android:name=".PacketTunnelProvider"
android:permission="android.permission.BIND_VPN_SERVICE"
android:foregroundServiceType="systemExempted"
android:exported="true">
<intent-filter>
<action android:name="android.net.VpnService" />
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/java/eu/neilalexander/yggdrasil/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class MainActivity : AppCompatActivity() {
startVpnActivity.launch(vpnIntent)
} else {
start()
enabledSwitch.isEnabled = false
}
}
false -> {
Expand Down Expand Up @@ -181,6 +182,9 @@ class MainActivity : AppCompatActivity() {
else -> getString(R.string.main_many_peers, count)
}
}
if (!enabledSwitch.isEnabled) {
enabledSwitch.isEnabled = true
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -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()
Expand Down

0 comments on commit 2b67079

Please sign in to comment.