summaryrefslogtreecommitdiff
path: root/app/src/main/java/foundation/e
diff options
context:
space:
mode:
authorTheScarastic <warabhishek@e.email>2022-05-24 20:26:37 +0530
committerTheScarastic <warabhishek@e.email>2022-05-24 20:29:48 +0530
commit1b6b76879840955c5177125c94849ec0ff760c8b (patch)
tree7ee1007c4a98ae84fa48fec245aa60329daa0467 /app/src/main/java/foundation/e
parente39b47d48f14ccb6e5dd5434ab5ccf0a9aed95a1 (diff)
privacycentralapp: use main looper for requestLocationUpdates
Diffstat (limited to 'app/src/main/java/foundation/e')
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt12
1 files changed, 4 insertions, 8 deletions
diff --git a/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt b/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt
index a475aa2..c026275 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt
@@ -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
- )
- // locationManager.requestLocationUpdates(
- // LocationManager.NETWORK_PROVIDER, // TODO: tight this with fakelocation module.
- // 0L,
- // 0f,
- // listener
- // )
+ listener,
+ Looper.getMainLooper()
+ )
val location: Location? = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER)
location?.let { listener.onLocationChanged(it) }