move ProcessLifecycleListener

This commit is contained in:
Milos Kozak 2022-11-26 23:58:46 +01:00
parent dcd70acbe7
commit 450494fb4c
3 changed files with 14 additions and 12 deletions

View file

@ -21,7 +21,7 @@ import info.nightscout.androidaps.receivers.ChargingStateReceiver
import info.nightscout.androidaps.receivers.KeepAliveWorker import info.nightscout.androidaps.receivers.KeepAliveWorker
import info.nightscout.androidaps.receivers.TimeDateOrTZChangeReceiver import info.nightscout.androidaps.receivers.TimeDateOrTZChangeReceiver
import info.nightscout.androidaps.services.AlarmSoundServiceHelper import info.nightscout.androidaps.services.AlarmSoundServiceHelper
import info.nightscout.androidaps.utils.ProcessLifecycleListener import info.nightscout.implementation.lifecycle.ProcessLifecycleListener
import info.nightscout.core.ui.locale.LocaleHelper import info.nightscout.core.ui.locale.LocaleHelper
import info.nightscout.core.utils.receivers.NetworkChangeReceiver import info.nightscout.core.utils.receivers.NetworkChangeReceiver
import info.nightscout.interfaces.versionChecker.VersionCheckerUtils import info.nightscout.interfaces.versionChecker.VersionCheckerUtils

View file

@ -1,13 +1,2 @@
package info.nightscout.androidaps.utils package info.nightscout.androidaps.utils
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner
import info.nightscout.interfaces.protection.ProtectionCheck
import javax.inject.Inject
class ProcessLifecycleListener @Inject constructor(private val protectionCheck: ProtectionCheck) : DefaultLifecycleObserver {
override fun onPause(owner: LifecycleOwner) {
protectionCheck.resetAuthorization()
}
}

View file

@ -0,0 +1,13 @@
package info.nightscout.implementation.lifecycle
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner
import info.nightscout.interfaces.protection.ProtectionCheck
import javax.inject.Inject
class ProcessLifecycleListener @Inject constructor(private val protectionCheck: ProtectionCheck) : DefaultLifecycleObserver {
override fun onPause(owner: LifecycleOwner) {
protectionCheck.resetAuthorization()
}
}