mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-03 01:53:05 +02:00
Tests can now be executed again on pre-Android 12.
This commit is contained in:
@@ -30,7 +30,7 @@ public class Startup extends Application {
|
||||
// Include version information into stack traces.
|
||||
Log.i(TAG, BuildConfig.APPLICATION_ID + "; BuildType: " + BuildConfig.BUILD_TYPE + "; VersionName: " + BuildConfig.VERSION_NAME + "/" + BuildConfig.VERSION_NAME_FULL + " VersionCode: " + BuildConfig.VERSION_CODE);
|
||||
|
||||
PreferencesUtils.initPreferences(this, getResources());
|
||||
PreferencesUtils.initPreferences(this);
|
||||
// Set default values of preferences on first start.
|
||||
PreferencesUtils.resetPreferences(this, false);
|
||||
PreferencesUtils.applyDefaultUnit();
|
||||
|
||||
@@ -75,8 +75,8 @@ public class PreferencesUtils {
|
||||
/**
|
||||
* Must be called during application startup.
|
||||
*/
|
||||
public static void initPreferences(final Context context, final Resources resources) {
|
||||
PreferencesUtils.resources = resources;
|
||||
public static void initPreferences(final Context context) {
|
||||
PreferencesUtils.resources = context.getResources();
|
||||
PreferencesUtils.sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
|
||||
PreferencesOpenHelper.newInstance(PREFERENCES_VERSION).check();
|
||||
|
||||
Reference in New Issue
Block a user