android: set wantRunning to true when started from Always On VPN (#392)

This way, even if the VPN wasn't previously manually enabled, it'll still turn on after reboot

Updates #cleanup

Signed-off-by: Percy Wegmann <percy@tailscale.com>
pull/393/head
Percy Wegmann 3 weeks ago committed by GitHub
parent 5476288100
commit 46cdbb7b9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -39,9 +39,9 @@ open class IPNService : VpnService(), libtailscale.IPNService {
}
"android.net.VpnService" -> {
// This means we were started by Android due to Always On VPN.
// Get the application to make sure it's been initialized, then
// request the VPN.
App.get()
// We don't show a foreground notification because we weren't
// started as a foreground service.
App.get().setWantRunning(true)
Libtailscale.requestVPN(this)
START_STICKY
}

Loading…
Cancel
Save