mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-02 21:09:30 +01:00
Fix a crash when disabling the location on the device
`LocationListener` does not have default implementation for some methods for Android versions below R
This commit is contained in:
parent
ff6810f1f4
commit
7242f1c2f1
@ -19,16 +19,16 @@ package im.vector.app.features.location
|
||||
import android.Manifest
|
||||
import android.content.Context
|
||||
import android.location.Location
|
||||
import android.location.LocationListener
|
||||
import android.location.LocationManager
|
||||
import androidx.annotation.RequiresPermission
|
||||
import androidx.core.content.getSystemService
|
||||
import androidx.core.location.LocationListenerCompat
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
class LocationTracker @Inject constructor(
|
||||
private val context: Context
|
||||
) : LocationListener {
|
||||
) : LocationListenerCompat {
|
||||
|
||||
interface Callback {
|
||||
fun onLocationUpdate(locationData: LocationData)
|
||||
|
Loading…
Reference in New Issue
Block a user