fix: remove 24h event log cleanup that caused log loss on service restart

This commit is contained in:
fiatcode 2026-05-06 16:33:47 +07:00
parent 4ce1f51062
commit c436dbc4a2
No known key found for this signature in database

View file

@ -153,11 +153,6 @@ class LocationTrackingService : Service() {
prefs.edit().putBoolean("tracking_active", true).apply() prefs.edit().putBoolean("tracking_active", true).apply()
Log.d(TAG, "startTracking: set tracking_active=true") Log.d(TAG, "startTracking: set tracking_active=true")
serviceScope.launch {
val cutoffTime = System.currentTimeMillis() - (24 * 60 * 60 * 1000)
database.eventLogDao().deleteOlderThan(cutoffTime)
}
fusedLocationProvider.startLocationUpdates( fusedLocationProvider.startLocationUpdates(
interval = config.interval * 1000L, interval = config.interval * 1000L,
fastestInterval = config.fastestInterval * 1000L, fastestInterval = config.fastestInterval * 1000L,