This commit is contained in:
lucky 2022-01-23 13:55:42 +03:00
parent e3a87e1108
commit 41f1153fb9
1 changed files with 12 additions and 2 deletions

View File

@ -10,11 +10,21 @@ import kotlin.concurrent.timerTask
@RequiresApi(Build.VERSION_CODES.N)
class QSTileService : TileService() {
private val prefs by lazy { Preferences(this) }
private val admin by lazy { DeviceAdminManager(this) }
private lateinit var prefs: Preferences
private lateinit var admin: DeviceAdminManager
private val counter = AtomicInteger(0)
private var timer: Timer? = null
override fun onCreate() {
super.onCreate()
init()
}
private fun init() {
prefs = Preferences(this)
admin = DeviceAdminManager(this)
}
override fun onStartListening() {
super.onStartListening()
update(