INNER CODE UNIT · Kotlin

AppLifecycleListener

Gedsh/InviZible · tordnscrypt/src/main/java/pan/alexander/tordnscrypt/AppLifecycleListener.kt:28

class AppLifecycleListener(private val app: App): DefaultLifecycleObserver {

    override fun onStart(owner: LifecycleOwner) {
        super.onStart(owner)

        app.isAppForeground = true

        ModulesAux.speedupModulesStateLoopTimer(app)
    }

    override fun onStop(owner: LifecycleOwner) {
        super.onStop(owner)

        app.isAppForeground = false

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            BaseTileService.releaseTilesSubcomponent()
            TilesLimiter.resetActiveTiles()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…