From 86e06eeabeaff5e9470ec23b2cc02ebd74fd15d9 Mon Sep 17 00:00:00 2001 From: Markus Doits Date: Thu, 30 Dec 2010 13:47:10 +0000 Subject: Allow to regenerate shared preferences Merge of r326 to trunk --- src/org/thialfihar/android/apg/Preferences.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/org/thialfihar/android/apg/Preferences.java b/src/org/thialfihar/android/apg/Preferences.java index d22565804..e704d79f3 100644 --- a/src/org/thialfihar/android/apg/Preferences.java +++ b/src/org/thialfihar/android/apg/Preferences.java @@ -12,9 +12,13 @@ public class Preferences { private static Preferences mPreferences; private SharedPreferences mSharedPreferences; - public static synchronized Preferences getPreferences(Context context) + public static synchronized Preferences getPreferences(Context context) { + return getPreferences(context, false); + } + + public static synchronized Preferences getPreferences(Context context, boolean force_new) { - if (mPreferences == null) { + if (mPreferences == null || force_new) { mPreferences = new Preferences(context); } return mPreferences; -- cgit v1.2.3