Only restore services when permitted

This commit is contained in:
Mygod
2021-10-29 23:13:24 -04:00
parent e48810d944
commit 1b329558dc
7 changed files with 36 additions and 21 deletions

View File

@@ -68,6 +68,7 @@ class LocalOnlyHotspotService : IpNeighbourMonitoringService(), CoroutineScope {
override fun onBind(intent: Intent?) = binder
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
BootReceiver.startIfEnabled()
if (binder.iface != null) return START_STICKY
binder.iface = ""
updateNotification() // show invisible foreground notification to avoid being killed