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:
Benoit Marty 2022-01-27 16:18:40 +01:00
parent ff6810f1f4
commit 7242f1c2f1

View file

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