Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b6b7687 authored by Abhishek Aggarwal's avatar Abhishek Aggarwal
Browse files

privacycentralapp: use main looper for requestLocationUpdates

parent e39b47d4
Loading
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.location.Location
import android.location.LocationListener
import android.location.LocationManager
import android.os.Bundle
import android.os.Looper
import android.util.Log
import foundation.e.privacycentralapp.data.repositories.LocalStateRepository
import foundation.e.privacycentralapp.domain.entities.LocationMode
@@ -172,14 +173,9 @@ class FakeLocationStateUseCase(
                LocationManager.NETWORK_PROVIDER, // TODO: tight this with fakelocation module.
                0L,
                0f,
                listener
                listener,
                Looper.getMainLooper()
                )
            // locationManager.requestLocationUpdates(
            //     LocationManager.NETWORK_PROVIDER, // TODO: tight this with fakelocation module.
            //     0L,
            //     0f,
            //     listener
            // )

            val location: Location? = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER)
            location?.let { listener.onLocationChanged(it) }