From 33405cd063d8f8619e2b652ec546fed34dddb71d Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 30 Nov 2023 17:43:46 -0800 Subject: [PATCH] Reload the database when resuming full_power. I had an incident where I was tampering with the database on my computer, being synced over Syncthing, and I caused a conflict that made the app stop recording, even though the app UI continued to show the normal recording icons. Closing and re-opening the db connection when leaving the house would have helped prevent that. --- app/src/main/java/net/voussoir/trkpt/TrackerService.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/net/voussoir/trkpt/TrackerService.kt b/app/src/main/java/net/voussoir/trkpt/TrackerService.kt index c707d4e..137f4a6 100644 --- a/app/src/main/java/net/voussoir/trkpt/TrackerService.kt +++ b/app/src/main/java/net/voussoir/trkpt/TrackerService.kt @@ -219,6 +219,7 @@ class TrackerService: Service() { state_dead() } + trackbook.load_database() tracking_state = Keys.STATE_FULL_RECORDING PreferencesHelper.saveTrackingState(tracking_state) reset_location_listeners(Keys.LOCATION_INTERVAL_FULL_POWER)