From f0a8d2edeea7c49929b43e60a426ee4bc9a3ecf0 Mon Sep 17 00:00:00 2001 From: danapple Date: Sat, 26 Feb 2011 19:28:47 -0600 Subject: [PATCH] Update date formatter on when importing preferences. --- src/com/fsck/k9/helper/DateFormatter.java | 5 +++++ src/com/fsck/k9/preferences/StorageImporter.java | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/com/fsck/k9/helper/DateFormatter.java b/src/com/fsck/k9/helper/DateFormatter.java index 12a9e1a31..9023573a0 100644 --- a/src/com/fsck/k9/helper/DateFormatter.java +++ b/src/com/fsck/k9/helper/DateFormatter.java @@ -75,6 +75,11 @@ public class DateFormatter { return sChosenFormat; } + public static void clearChosenFormat() + { + sChosenFormat = null; + } + public static DateFormat getDateFormat(Context context) { String formatString = getFormat(context); return getDateFormat(context, formatString); diff --git a/src/com/fsck/k9/preferences/StorageImporter.java b/src/com/fsck/k9/preferences/StorageImporter.java index 20673532f..4991d266d 100644 --- a/src/com/fsck/k9/preferences/StorageImporter.java +++ b/src/com/fsck/k9/preferences/StorageImporter.java @@ -24,6 +24,7 @@ import android.util.Log; import com.fsck.k9.K9; import com.fsck.k9.Preferences; +import com.fsck.k9.helper.DateFormatter; public class StorageImporter { public static int importPreferences(Context context, String fileName, String encryptionKey) throws StorageImportExportException { @@ -68,6 +69,7 @@ public class StorageImporter { } editor.commit(); Preferences.getPreferences(context).refreshAccounts(); + DateFormatter.clearChosenFormat(); K9.loadPrefs(Preferences.getPreferences(context)); return numAccounts; } catch (SAXException se) {