From 4e2beedaefa417c9853e27ec0eba29067c39061e Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 30 Nov 2023 22:40:38 -0800 Subject: [PATCH] Rename gave_up_at to dead_at. --- .../main/java/net/voussoir/trkpt/MapFragment.kt | 2 +- .../main/java/net/voussoir/trkpt/TrackerService.kt | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/net/voussoir/trkpt/MapFragment.kt b/app/src/main/java/net/voussoir/trkpt/MapFragment.kt index 4b6335f..04a0215 100644 --- a/app/src/main/java/net/voussoir/trkpt/MapFragment.kt +++ b/app/src/main/java/net/voussoir/trkpt/MapFragment.kt @@ -677,7 +677,7 @@ class MapFragment : Fragment() motion: ${iso8601_local_noms(tracker.last_significant_motion)} watchdog: ${iso8601_local_noms(tracker.last_watchdog)} home: ${iso8601_local_noms(tracker.arrived_at_home)} - died: ${iso8601_local_noms(tracker.gave_up_at)} + died: ${iso8601_local_noms(tracker.dead_at)} power: ${tracker.device_is_charging} wakelock: ${tracker.wakelock.isHeld} accuracy: ${accuracy_text} m diff --git a/app/src/main/java/net/voussoir/trkpt/TrackerService.kt b/app/src/main/java/net/voussoir/trkpt/TrackerService.kt index 137f4a6..686fa5d 100644 --- a/app/src/main/java/net/voussoir/trkpt/TrackerService.kt +++ b/app/src/main/java/net/voussoir/trkpt/TrackerService.kt @@ -56,7 +56,7 @@ class TrackerService: Service() var listeners_enabled_at: Long = 0 var last_significant_motion: Long = 0 var last_watchdog: Long = 0 - var gave_up_at: Long = 0 + var dead_at: Long = 0 var arrived_at_home: Long = 0 val TIME_UNTIL_SLEEP: Long = 5 * Keys.ONE_MINUTE_IN_MILLISECONDS val TIME_UNTIL_DEAD: Long = 3 * Keys.ONE_MINUTE_IN_MILLISECONDS @@ -200,7 +200,7 @@ class TrackerService: Service() trackbook.database.commit() recent_displacement_locations.clear() arrived_at_home = 0 - gave_up_at = 0 + dead_at = 0 if (foreground_started > 0) { stopForeground(STOP_FOREGROUND_DETACH) @@ -224,7 +224,7 @@ class TrackerService: Service() PreferencesHelper.saveTrackingState(tracking_state) reset_location_listeners(Keys.LOCATION_INTERVAL_FULL_POWER) arrived_at_home = 0 - gave_up_at = 0 + dead_at = 0 if (foreground_started == 0L) { startForeground(Keys.TRACKER_SERVICE_NOTIFICATION_ID, displayNotification()) @@ -250,7 +250,7 @@ class TrackerService: Service() reset_location_listeners(Keys.LOCATION_INTERVAL_FULL_POWER) trackbook.database.commit() arrived_at_home = System.currentTimeMillis() - gave_up_at = 0 + dead_at = 0 stop_wakelock() displayNotification() } @@ -263,7 +263,7 @@ class TrackerService: Service() PreferencesHelper.saveTrackingState(tracking_state) reset_location_listeners(Keys.LOCATION_INTERVAL_SLEEP) arrived_at_home = arrived_at_home - gave_up_at = 0 + dead_at = 0 stop_wakelock() displayNotification() } @@ -279,7 +279,7 @@ class TrackerService: Service() trackbook.database.commit() recent_displacement_locations.clear() arrived_at_home = 0 - gave_up_at = System.currentTimeMillis() + dead_at = System.currentTimeMillis() stop_wakelock() displayNotification() } @@ -292,7 +292,7 @@ class TrackerService: Service() PreferencesHelper.saveTrackingState(tracking_state) reset_location_listeners(Keys.LOCATION_INTERVAL_FULL_POWER) arrived_at_home = 0 - gave_up_at = 0 + dead_at = 0 stop_wakelock() displayNotification() if (!gpsLocationListenerRegistered && !networkLocationListenerRegistered)