Skip to content

Colota - Android GPS Location tracker

chore(location): drop issue numbers from the accuracy comments (#978)

Max Dietrich2c487563b5a7
diff --git a/apps/mobile/android/app/src/gms/java/com/Colota/location/GmsLocationProvider.kt b/apps/mobile/android/app/src/gms/java/com/Colota/location/GmsLocationProvider.kt
index 43a21ebe..1cfc027d 100644
--- a/apps/mobile/android/app/src/gms/java/com/Colota/location/GmsLocationProvider.kt
+++ b/apps/mobile/android/app/src/gms/java/com/Colota/location/GmsLocationProvider.kt
@@ -78,7 +78,7 @@ class GmsLocationProvider(context: Context) : LocationProvider {
}
override fun getCurrentLocation(timeoutMs: Long, onResult: (Location?) -> Unit) {
- // Intentionally always High accuracy (#951), regardless of the configured stream mode: this
+ // Intentionally always High accuracy, regardless of the configured stream mode: this
// one-shot probe decides pause-zone exit, the watchdog and the stationary heartbeat.
// setMaxUpdateAgeMillis(0) forbids the cached fix, forcing a real GNSS acquisition.
val request = CurrentLocationRequest.Builder()
diff --git a/apps/mobile/android/app/src/main/java/com/colota/location/LocationAccuracy.kt b/apps/mobile/android/app/src/main/java/com/colota/location/LocationAccuracy.kt
index 482262b1..6c3fef28 100644
--- a/apps/mobile/android/app/src/main/java/com/colota/location/LocationAccuracy.kt
+++ b/apps/mobile/android/app/src/main/java/com/colota/location/LocationAccuracy.kt
@@ -6,13 +6,12 @@
package com.Colota.location
/**
- * Positioning accuracy of the continuous location stream (#951).
+ * Positioning accuracy of the continuous location stream.
*
- * [HIGH] preserves the historical behaviour (the provider may keep GNSS engaged). [BALANCED]
+ * [HIGH] lets the provider keep GNSS engaged. [BALANCED]
* trades precision for battery by letting the provider prefer network / lower-power fixes.
*
- * There is deliberately no `LOW_POWER` mode: it is cell-tower, city-level (~10 km) and would
- * reproduce the zigzag failure the maintainer reverted (#215).
+ * There is deliberately no `LOW_POWER` mode: its cell-tower, city-level fixes (~10 km) zigzag the track.
*/
enum class LocationAccuracy(val wireName: String) {
HIGH("high"),
diff --git a/apps/mobile/android/app/src/main/java/com/colota/location/LocationProvider.kt b/apps/mobile/android/app/src/main/java/com/colota/location/LocationProvider.kt
index ec68937f..fad5695e 100644
--- a/apps/mobile/android/app/src/main/java/com/colota/location/LocationProvider.kt
+++ b/apps/mobile/android/app/src/main/java/com/colota/location/LocationProvider.kt
@@ -50,7 +50,7 @@ interface LocationProvider {
/**
* Actively acquire one fresh fix, forbidding cached locations.
*
- * Always requested at High accuracy, independent of the configured stream mode (#951): this one-shot
+ * Always requested at High accuracy, independent of the configured stream mode: this one-shot
* probe drives pause-zone exit, the pause watchdog and the stationary heartbeat, and a network-only
* fix could falsely exit a geofence. Best-effort on the FOSS raw-GPS path below Android 12, where the
* compat API takes no quality hint.
diff --git a/apps/mobile/android/app/src/main/java/com/colota/service/ProfileManager.kt b/apps/mobile/android/app/src/main/java/com/colota/service/ProfileManager.kt
index b484eda7..358a4c8e 100644
--- a/apps/mobile/android/app/src/main/java/com/colota/service/ProfileManager.kt
+++ b/apps/mobile/android/app/src/main/java/com/colota/service/ProfileManager.kt
@@ -48,7 +48,7 @@ class ProfileManager(
@Volatile var defaultSyncInterval: Int = 0
// Global positioning accuracy, written by the service on config load; read by
- // evaluateStationaryState() so a non-High stream does not treat a speed-less fix as stillness (#951).
+ // evaluateStationaryState() so a non-High stream does not treat a speed-less fix as stillness.
@Volatile var defaultAccuracyMode: LocationAccuracy = LocationAccuracy.HIGH
// @Volatile: getActiveProfileName() reads it without the lock.
@@ -383,11 +383,11 @@ class ProfileManager(
val speed = if (location.hasSpeed()) {
location.speed
} else if (defaultAccuracyMode == LocationAccuracy.HIGH) {
- // High mode has always read an absent speed as stillness: on this path GNSS fixes carry it.
+ // Under High, GNSS fixes carry speed, so an absent one reads as stillness.
0f
} else {
- // Balanced hands us speed-less network fixes, and a missing speed is not proof of stillness
- // (#951). A derived speed from `applySpeedFallback()` sets `hasSpeed()` first, so only a
+ // Balanced hands us speed-less network fixes, and a missing speed is not proof of stillness.
+ // A derived speed from `applySpeedFallback()` sets `hasSpeed()` first, so only a
// genuinely speed-less fix reaches this branch.
return
}
diff --git a/apps/mobile/src/types/global.ts b/apps/mobile/src/types/global.ts
index 0c2ea9c2..a34a2c50 100644
--- a/apps/mobile/src/types/global.ts
+++ b/apps/mobile/src/types/global.ts
@@ -110,7 +110,7 @@ export type HttpMethod = "POST" | "GET"
export type SyncCondition = "any" | "wifi_any" | "wifi_ssid" | "vpn"
-/** Positioning accuracy of the continuous location stream (#951). */
+/** Positioning accuracy of the continuous location stream. */
export type AccuracyMode = "high" | "balanced"
export type ApiTemplateName =