mirror of
https://github.com/home-assistant/android
synced 2024-09-18 23:52:51 +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
|
||||
)
|
||||
internal const val TAG = "LocBroadcastReceiver"
|
||||
|
||||
private var isBackgroundLocationSetup = false
|
||||
private var isZoneLocationSetup = false
|
||||
}
|
||||
|
||||
@Inject
|
||||
|
@ -65,9 +68,6 @@ class LocationSensorManager : BroadcastReceiver(), SensorManager {
|
|||
|
||||
lateinit var latestContext: Context
|
||||
|
||||
private var isBackgroundLocationSetup = false
|
||||
private var isZoneLocationSetup = false
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
latestContext = context
|
||||
ensureInjected()
|
||||
|
|
Loading…
Reference in a new issue