Allow to regenerate shared preferences
Merge of r326 to trunk
This commit is contained in:
1 parent
1edac5a61e
commit
86e06eeabe
1 file changed
+6
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user