diff options
author | TheScarastic <warabhishek@e.email> | 2022-05-24 20:26:37 +0530 |
---|---|---|
committer | TheScarastic <warabhishek@e.email> | 2022-05-24 20:29:48 +0530 |
commit | 1b6b76879840955c5177125c94849ec0ff760c8b (patch) | |
tree | 7ee1007c4a98ae84fa48fec245aa60329daa0467 /app/src/main/java/foundation | |
parent | e39b47d48f14ccb6e5dd5434ab5ccf0a9aed95a1 (diff) |
privacycentralapp: use main looper for requestLocationUpdates
Diffstat (limited to 'app/src/main/java/foundation')
-rw-r--r-- | app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt | 12 |
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) } |