mirror of
https://github.com/yggdrasil-network/yggdrasil-android.git
synced 2025-04-29 06:35:08 +03:00
Prepare for release 0.5.9 (#68)
Updated the yggdrasil-go submodule. Fixed #64, updated some deps.
This commit is contained in:
parent
34756b2193
commit
cdc12a8e7e
6 changed files with 22 additions and 12 deletions
|
@ -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"
|
||||
|
@ -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" />
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue