diff options
author | Leonard Kugis <leonard@kug.is> | 2024-01-05 14:23:49 +0100 |
---|---|---|
committer | Leonard Kugis <leonard@kug.is> | 2024-01-05 14:23:49 +0100 |
commit | b23034b28453d5b9421009dfd7e94790dde24f6e (patch) | |
tree | ff8635f83e355533fb38f6cd51f66c9c1054bc7c /fakelocation/src/main/java/foundation/e | |
parent | b7453581a401fb57eb52edddcb27ea048a9c7389 (diff) |
FakeLocationService: Resetting route time correctly.
Diffstat (limited to 'fakelocation/src/main/java/foundation/e')
-rw-r--r-- | fakelocation/src/main/java/foundation/e/advancedprivacy/fakelocation/services/FakeLocationService.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fakelocation/src/main/java/foundation/e/advancedprivacy/fakelocation/services/FakeLocationService.kt b/fakelocation/src/main/java/foundation/e/advancedprivacy/fakelocation/services/FakeLocationService.kt index 41784a1..5136ec9 100644 --- a/fakelocation/src/main/java/foundation/e/advancedprivacy/fakelocation/services/FakeLocationService.kt +++ b/fakelocation/src/main/java/foundation/e/advancedprivacy/fakelocation/services/FakeLocationService.kt @@ -126,6 +126,7 @@ class FakeLocationService : Service() { Actions.START_ROUTE -> { route = Gson().fromJson(it.getStringExtra(PARAM_ROUTE) ?: "[]", object : TypeToken<List<FakeLocationCoordinate>>() {}.type) loopRoute = it.getBooleanExtra(PARAM_ROUTE_LOOP, false) + routeTime = 0f initTimerRoute() } else -> {} @@ -226,7 +227,6 @@ class FakeLocationService : Service() { private fun initTimerRoute() { cdtRoute?.cancel() - routeTime = 0f cdtRoute = object : CountDownTimer(PERIOD_UPDATES_SERIE, PERIOD_LOCATION_UPDATE) { override fun onTick(millisUntilFinished: Long) { var coord = calculateRouteSegment() |