Cleanup: SharedPreference as static variable.

Fixes #961.
This commit is contained in:
Dennis Guse
2021-09-28 23:32:53 +02:00
parent d7bc550b29
commit eac3d4b3db
44 changed files with 431 additions and 504 deletions
@@ -29,10 +29,9 @@ public class ExportUtils {
private static final String TAG = ExportUtils.class.getSimpleName();
public static void postWorkoutExport(Context context, Track.Id trackId, ExportServiceResultReceiver resultReceiver) {
SharedPreferences sharedPreferences = PreferencesUtils.getSharedPreferences(context);
if (PreferencesUtils.shouldInstantExportAfterWorkout(sharedPreferences, context)) {
TrackFileFormat trackFileFormat = PreferencesUtils.getExportTrackFileFormat(sharedPreferences, context);
DocumentFile directory = PreferencesUtils.getDefaultExportDirectoryUri(sharedPreferences, context);
if (PreferencesUtils.shouldInstantExportAfterWorkout(context)) {
TrackFileFormat trackFileFormat = PreferencesUtils.getExportTrackFileFormat();
DocumentFile directory = PreferencesUtils.getDefaultExportDirectoryUri(context);
ExportService.enqueue(context, resultReceiver, trackId, trackFileFormat, directory.getUri());
}