Drop location in tracker service (temp) 4'

This commit is contained in:
max-klaus 2021-01-13 13:07:18 +03:00
parent 4b51b5fdb7
commit f1dd47c0e2

View file

@ -87,6 +87,7 @@ class TelegramLocationProvider(private val app: TelegramApplication) : SensorEve
@SuppressLint("MissingPermission") @SuppressLint("MissingPermission")
fun resumeAllUpdates() { fun resumeAllUpdates() {
/*
val service = app.getSystemService(Context.LOCATION_SERVICE) as LocationManager val service = app.getSystemService(Context.LOCATION_SERVICE) as LocationManager
if (app.isInternetConnectionAvailable) { if (app.isInternetConnectionAvailable) {
if (System.currentTimeMillis() - agpsDataLastTimeDownloaded > AGPS_TO_REDOWNLOAD) { if (System.currentTimeMillis() - agpsDataLastTimeDownloaded > AGPS_TO_REDOWNLOAD) {
@ -134,7 +135,7 @@ class TelegramLocationProvider(private val app: TelegramApplication) : SensorEve
} }
} }
*/
registerOrUnregisterCompassListener(true) registerOrUnregisterCompassListener(true)
} }
@ -391,12 +392,14 @@ class TelegramLocationProvider(private val app: TelegramApplication) : SensorEve
} }
private fun stopLocationRequests() { private fun stopLocationRequests() {
/*
val service = app.getSystemService(Context.LOCATION_SERVICE) as LocationManager val service = app.getSystemService(Context.LOCATION_SERVICE) as LocationManager
service.removeGpsStatusListener(gpsStatusListener) service.removeGpsStatusListener(gpsStatusListener)
service.removeUpdates(gpsListener) service.removeUpdates(gpsListener)
while (!networkListeners.isEmpty()) { while (!networkListeners.isEmpty()) {
service.removeUpdates(networkListeners.poll()) service.removeUpdates(networkListeners.poll())
} }
*/
} }
fun pauseAllUpdates() { fun pauseAllUpdates() {