try catch

This commit is contained in:
callebtc
2026-01-15 14:30:05 +07:00
parent 6fd2c698c5
commit 337171a141
@@ -110,7 +110,11 @@ class SystemLocationProvider(private val context: Context) : LocationProvider {
handler.removeCallbacks(runnable)
}
}
try {
locationManager.removeUpdates(this)
} catch (e: Exception) {
Log.e(TAG, "Error removing updates in callback: ${e.message}")
}
callback(location)
}
override fun onStatusChanged(provider: String?, status: Int, extras: Bundle?) {}