mirror of
https://github.com/yggdrasil-network/yggdrasil-android.git
synced 2025-04-28 14:15:08 +03:00
Implemented Yggdrasil start after device boot (#39)
Implemented Yggdrasil start after device boot (even if Always-On VPN disabled).
This commit is contained in:
parent
055aab328d
commit
a07412d02d
7 changed files with 93 additions and 21 deletions
|
@ -20,7 +20,7 @@ import kotlin.concurrent.thread
|
|||
private const val TAG = "PacketTunnelProvider"
|
||||
const val SERVICE_NOTIFICATION_ID = 1000
|
||||
|
||||
class PacketTunnelProvider: VpnService() {
|
||||
open class PacketTunnelProvider: VpnService() {
|
||||
companion object {
|
||||
const val STATE_INTENT = "eu.neilalexander.yggdrasil.PacketTunnelProvider.STATE_MESSAGE"
|
||||
|
||||
|
@ -68,9 +68,9 @@ class PacketTunnelProvider: VpnService() {
|
|||
ACTION_CONNECT -> {
|
||||
Log.d(TAG, "Connecting...")
|
||||
if (started.get()) {
|
||||
connect();
|
||||
connect()
|
||||
} else {
|
||||
start();
|
||||
start()
|
||||
}
|
||||
START_STICKY
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue