From 4dbbe12aa8b70eed28e1d668cbd0fc329e2b7c7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karlo=20=C4=8Ceh?= Date: Wed, 6 Mar 2024 10:02:57 +0100 Subject: [PATCH] Remove sensor trigger --- .../data/models/memory/triggers/shared/SensorTrigger.kt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sentinel/src/main/kotlin/com/infinum/sentinel/data/models/memory/triggers/shared/SensorTrigger.kt b/sentinel/src/main/kotlin/com/infinum/sentinel/data/models/memory/triggers/shared/SensorTrigger.kt index b2a10c8..b10a0e8 100644 --- a/sentinel/src/main/kotlin/com/infinum/sentinel/data/models/memory/triggers/shared/SensorTrigger.kt +++ b/sentinel/src/main/kotlin/com/infinum/sentinel/data/models/memory/triggers/shared/SensorTrigger.kt @@ -20,16 +20,10 @@ internal abstract class SensorTrigger( abstract fun processEvent(event: SensorEvent): Boolean - private var activeHolder: Boolean? = null - override fun start() { sensorManager = (context.getSystemService(Context.SENSOR_SERVICE) as? SensorManager) sensorManager?.let { registerSensor(it) - if (activeHolder == null) { - activeHolder = active - } - this.active = activeHolder ?: true // use remembered active state } ?: run { this.active = false } @@ -39,8 +33,6 @@ internal abstract class SensorTrigger( queue?.clear() unregisterSensor() sensorManager = null - activeHolder = active // remember active state - this.active = false } override fun onSensorChanged(event: SensorEvent) {