Ensure that we only register once for location updates (really this time) (#874)

This commit is contained in:
Anna Tikhomirova 2020-09-03 21:16:16 +03:00 committed by GitHub
parent bd2cfb5aa4
commit 986655c912
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()