fix: wifi name surrounding quotes, prevent multiple auto-tunnel jobs

#768
#797
This commit is contained in:
Zane Schepke
2025-06-14 15:39:22 -04:00
parent 03345bdf86
commit 599bf9c9e0
3 changed files with 17 additions and 10 deletions
@@ -73,6 +73,8 @@ class AutoTunnelService : LifecycleService() {
private val binder = LocalBinder(this)
private var isServiceRunning = false
override fun onCreate() {
super.onCreate()
launchWatcherNotification()
@@ -91,6 +93,8 @@ class AutoTunnelService : LifecycleService() {
}
fun start() {
if (isServiceRunning) return
isServiceRunning = true
kotlin
.runCatching {
launchWatcherNotification()
@@ -103,6 +107,7 @@ class AutoTunnelService : LifecycleService() {
}
fun stop() {
isServiceRunning = false
wakeLock?.let { if (it.isHeld) it.release() }
stopSelf()
}