forked from upstream-mirrors/OpenTracks
BREAKING CHANGE: Moved to getDefaultSharedPreferences().
This commit is contained in:
@@ -27,10 +27,6 @@ public class Constants {
|
|||||||
* Maximum number of waypoints that will be loaded at one time.
|
* Maximum number of waypoints that will be loaded at one time.
|
||||||
*/
|
*/
|
||||||
public static final int MAX_LOADED_WAYPOINTS_POINTS = 10000;
|
public static final int MAX_LOADED_WAYPOINTS_POINTS = 10000;
|
||||||
/**
|
|
||||||
* The settings file name.
|
|
||||||
*/
|
|
||||||
public static final String SETTINGS_NAME = "SettingsActivity";
|
|
||||||
|
|
||||||
private Constants() {
|
private Constants() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ package de.dennisguse.opentracks.util;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.SharedPreferences.Editor;
|
import android.content.SharedPreferences.Editor;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
|
|
||||||
import de.dennisguse.opentracks.Constants;
|
import de.dennisguse.opentracks.Constants;
|
||||||
import de.dennisguse.opentracks.R;
|
import de.dennisguse.opentracks.R;
|
||||||
@@ -94,7 +95,7 @@ public class PreferencesUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static SharedPreferences getSharedPreferences(Context context) {
|
public static SharedPreferences getSharedPreferences(Context context) {
|
||||||
return context.getSharedPreferences(Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
return PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user