summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/foundation/e/advancedprivacy/domain/usecases/FakeLocationStateUseCase.kt24
1 files changed, 0 insertions, 24 deletions
diff --git a/app/src/main/java/foundation/e/advancedprivacy/domain/usecases/FakeLocationStateUseCase.kt b/app/src/main/java/foundation/e/advancedprivacy/domain/usecases/FakeLocationStateUseCase.kt
index 1f92554..49b9317 100644
--- a/app/src/main/java/foundation/e/advancedprivacy/domain/usecases/FakeLocationStateUseCase.kt
+++ b/app/src/main/java/foundation/e/advancedprivacy/domain/usecases/FakeLocationStateUseCase.kt
@@ -82,30 +82,6 @@ class FakeLocationStateUseCase(
permissionsModule.toggleDangerousPermission(appDesc, android.Manifest.permission.ACCESS_FINE_LOCATION, true)
}
- // private fun applySettings(isEnabled: Boolean, isSpecificLocation: Boolean = false) {
- // _configuredLocationMode.value = computeLocationMode(isEnabled,
- // localStateRepository.locationMode,
- // localStateRepository.fakeAltitude,
- // localStateRepository.fakeSpeed,
- // localStateRepository.fakeJitter,
- // localStateRepository.fakeLocation,
- // localStateRepository.routeLoopEnabled,
- // isSpecificLocation)
-
- // if (isEnabled && hasAcquireMockLocationPermission()) {
- // fakeLocationModule.startFakeLocation()
- // localStateRepository.setLocationMode(configuredLocationMode.value.mode)
- // fakeLocationModule.setFakeLocation(localStateRepository.fakeAltitude.toDouble(),
- // localStateRepository.fakeSpeed,
- // localStateRepository.fakeJitter,
- // localStateRepository.fakeLocation.first.toDouble(),
- // localStateRepository.fakeLocation.second.toDouble())
- // } else {
- // fakeLocationModule.stopFakeLocation()
- // localStateRepository.setLocationMode(LocationMode.REAL_LOCATION)
- // }
- // }
-
private fun hasAcquireMockLocationPermission(): Boolean {
return (permissionsModule.getAppOpMode(appDesc, AppOpsManager.OPSTR_MOCK_LOCATION) == AppOpModes.ALLOWED) ||
permissionsModule.setAppOpMode(appDesc, AppOpsManager.OPSTR_MOCK_LOCATION, AppOpModes.ALLOWED)