mirror of
https://github.com/ev-map/EVMap.git
synced 2026-04-30 19:14:22 -04:00
suppress lint again
This commit is contained in:
@@ -1309,9 +1309,11 @@ class MapFragment : Fragment(), OnMapReadyCallback, MapsActivity.FragmentCallbac
|
||||
requestingLocationUpdates = true
|
||||
}
|
||||
|
||||
@RequiresPermission(anyOf = [ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION])
|
||||
@SuppressLint("MissingPermission")
|
||||
private fun removeLocationUpdates() {
|
||||
locationManager.removeUpdates(locationListener)
|
||||
if (context?.checkAnyLocationPermission() == true) {
|
||||
locationManager.removeUpdates(locationListener)
|
||||
}
|
||||
}
|
||||
|
||||
private val locationListener = LocationListenerCompat { location ->
|
||||
@@ -1336,9 +1338,7 @@ class MapFragment : Fragment(), OnMapReadyCallback, MapsActivity.FragmentCallbac
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
if (context?.checkAnyLocationPermission() == true) {
|
||||
removeLocationUpdates()
|
||||
}
|
||||
removeLocationUpdates()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
Reference in New Issue
Block a user