Only restore services when permitted
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
package be.mygod.vpnhotspot.util
|
||||
|
||||
import android.content.ComponentName
|
||||
import android.content.Intent
|
||||
import android.content.ServiceConnection
|
||||
import android.os.Build
|
||||
import android.os.IBinder
|
||||
import android.service.quicksettings.Tile
|
||||
import android.service.quicksettings.TileService
|
||||
import androidx.annotation.RequiresApi
|
||||
import be.mygod.vpnhotspot.BootReceiver
|
||||
|
||||
@RequiresApi(24)
|
||||
abstract class KillableTileService : TileService(), ServiceConnection {
|
||||
@@ -25,4 +27,6 @@ abstract class KillableTileService : TileService(), ServiceConnection {
|
||||
onClick()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBind(intent: Intent?) = super.onBind(intent).also { BootReceiver.startIfEnabled() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user