move ProcessLifecycleListener
This commit is contained in:
parent
dcd70acbe7
commit
450494fb4c
|
@ -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
|
||||||
|
|
|
@ -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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -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()
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue