forked from upstream-mirrors/OpenTracks
Bugfix reset settings: really clear sharedPreferences before settings default values.
This commit is contained in:
@@ -368,6 +368,10 @@ public class PreferencesUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void resetPreferences(Context context, boolean readAgain) {
|
public static void resetPreferences(Context context, boolean readAgain) {
|
||||||
|
if (readAgain) {
|
||||||
|
// We want to really clear settings now.
|
||||||
|
getSharedPreferences(context).edit().clear().commit();
|
||||||
|
}
|
||||||
PreferenceManager.setDefaultValues(context, R.xml.settings, readAgain);
|
PreferenceManager.setDefaultValues(context, R.xml.settings, readAgain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user