diff --git a/res/values/strings.xml b/res/values/strings.xml index e16ca6622..6e509193c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -331,6 +331,8 @@ Please submit bug reports, contribute new features and ask questions at Spam Delete (from notification) + Remove K-9 User-Agent from mail headers + Use UTC as time zone in mail headers Hide subject in notifications Never When device is locked diff --git a/res/xml/global_preferences.xml b/res/xml/global_preferences.xml index 90c1c7ed6..c985c35d9 100644 --- a/res/xml/global_preferences.xml +++ b/res/xml/global_preferences.xml @@ -378,6 +378,16 @@ android:entryValues="@array/global_settings_notification_hide_subject_values" android:title="@string/global_settings_notification_hide_subject_title"/> + + + + "; + String hostname = null; + + if (mFrom != null && mFrom.length >= 1) { + hostname = mFrom[0].getHostname(); + } + + if (hostname == null && mReplyTo != null && mReplyTo.length >= 1) { + hostname = mReplyTo[0].getHostname(); + } + + if (hostname == null) { + hostname = "email.android.com"; + } + + /* We use upper case here to match Apple Mail Message-ID format (for privacy) */ + return "<" + UUID.randomUUID().toString().toUpperCase(Locale.US) + "@" + hostname + ">"; } public void setMessageId(String messageId) throws UnavailableStorageException { diff --git a/src/com/fsck/k9/preferences/GlobalSettings.java b/src/com/fsck/k9/preferences/GlobalSettings.java index a55da2662..4f1d089c0 100644 --- a/src/com/fsck/k9/preferences/GlobalSettings.java +++ b/src/com/fsck/k9/preferences/GlobalSettings.java @@ -249,6 +249,12 @@ public class GlobalSettings { s.put("fontSizeMessageViewContentPercent", Settings.versions( new V(31, new IntegerRangeSetting(40, 250, 100)) )); + s.put("hideUserAgent", Settings.versions( + new V(32, new BooleanSetting(false)) + )); + s.put("hideTimeZone", Settings.versions( + new V(32, new BooleanSetting(false)) + )); SETTINGS = Collections.unmodifiableMap(s); diff --git a/src/com/fsck/k9/preferences/Settings.java b/src/com/fsck/k9/preferences/Settings.java index 11ecc921a..b4dd8ef41 100644 --- a/src/com/fsck/k9/preferences/Settings.java +++ b/src/com/fsck/k9/preferences/Settings.java @@ -35,7 +35,7 @@ public class Settings { * * @see SettingsExporter */ - public static final int VERSION = 31; + public static final int VERSION = 32; public static Map validate(int version, Map> settings,