Reset recordingTrackId on application Startup.

This is necessary if the TrackRecordingService crashed.
This commit is contained in:
Dennis Guse
2020-08-23 17:36:30 +02:00
parent c610758ae1
commit 60d5e7e515
@@ -32,6 +32,11 @@ public class Startup extends Application {
PreferencesUtils.setString(this, R.string.stats_units_key, statsUnits);
}
//TODO Workaround to reset recordingTrackId on app startup as the TrackRecordingService (likely) crashed.
if (PreferencesUtils.isRecording(this)) {
Log.e(TAG, "Reset recordingTrackId; likely the TrackRecordingService crashed.");
PreferencesUtils.setLong(this, R.string.recording_track_id_key, PreferencesUtils.RECORDING_TRACK_ID_DEFAULT);
}
//In debug builds: show thread and VM warnings.
if (BuildConfig.DEBUG) {