mirror of
https://github.com/home-assistant/android
synced 2024-09-19 16:11:37 +00:00
Ensure that we only register once for location updates (really this time) (#874)
This commit is contained in:
parent
bd2cfb5aa4
commit
986655c912
|
@ -56,6 +56,9 @@ class LocationSensorManager : BroadcastReceiver(), SensorManager {
|
||||||
R.string.sensor_description_location_zone
|
R.string.sensor_description_location_zone
|
||||||
)
|
)
|
||||||
internal const val TAG = "LocBroadcastReceiver"
|
internal const val TAG = "LocBroadcastReceiver"
|
||||||
|
|
||||||
|
private var isBackgroundLocationSetup = false
|
||||||
|
private var isZoneLocationSetup = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@ -65,9 +68,6 @@ class LocationSensorManager : BroadcastReceiver(), SensorManager {
|
||||||
|
|
||||||
lateinit var latestContext: Context
|
lateinit var latestContext: Context
|
||||||
|
|
||||||
private var isBackgroundLocationSetup = false
|
|
||||||
private var isZoneLocationSetup = false
|
|
||||||
|
|
||||||
override fun onReceive(context: Context, intent: Intent) {
|
override fun onReceive(context: Context, intent: Intent) {
|
||||||
latestContext = context
|
latestContext = context
|
||||||
ensureInjected()
|
ensureInjected()
|
||||||
|
|
Loading…
Reference in a new issue