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.
This commit is contained in:
voussoir 2023-11-30 17:43:46 -08:00
parent 37c5754a24
commit 33405cd063

View file

@ -219,6 +219,7 @@ class TrackerService: Service()
{ {
state_dead() state_dead()
} }
trackbook.load_database()
tracking_state = Keys.STATE_FULL_RECORDING tracking_state = Keys.STATE_FULL_RECORDING
PreferencesHelper.saveTrackingState(tracking_state) PreferencesHelper.saveTrackingState(tracking_state)
reset_location_listeners(Keys.LOCATION_INTERVAL_FULL_POWER) reset_location_listeners(Keys.LOCATION_INTERVAL_FULL_POWER)