Skip to content

Commit

Permalink
remove "hideHostnameWhenConnecting" from global settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Valodim committed Dec 5, 2018
1 parent c06e1a9 commit 4333a3a
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 30 deletions.
5 changes: 0 additions & 5 deletions app/core/src/main/java/com/fsck/k9/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -755,11 +755,6 @@ public synchronized int getIdleRefreshMinutes() {
return idleRefreshMinutes;
}

@Override
public boolean shouldHideHostname() {
return K9.hideHostnameWhenConnecting();
}

public synchronized void setIdleRefreshMinutes(int idleRefreshMinutes) {
this.idleRefreshMinutes = idleRefreshMinutes;
}
Expand Down
11 changes: 0 additions & 11 deletions app/core/src/main/java/com/fsck/k9/K9.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ public enum SplitViewMode {
private static boolean wrapFolderNames = false;
private static boolean hideUserAgent = false;
private static boolean hideTimeZone = false;
private static boolean hideHostnameWhenConnecting = false;

private static SortType sortType;
private static Map<SortType, Boolean> sortAscending = new HashMap<>();
Expand Down Expand Up @@ -287,7 +286,6 @@ public static void save(StorageEditor editor) {
editor.putBoolean("wrapFolderNames", wrapFolderNames);
editor.putBoolean("hideUserAgent", hideUserAgent);
editor.putBoolean("hideTimeZone", hideTimeZone);
editor.putBoolean("hideHostnameWhenConnecting", hideHostnameWhenConnecting);

editor.putString("language", language);
editor.putInt("theme", theme.ordinal());
Expand Down Expand Up @@ -434,7 +432,6 @@ public static void loadPrefs(Preferences prefs) {
wrapFolderNames = storage.getBoolean("wrapFolderNames", false);
hideUserAgent = storage.getBoolean("hideUserAgent", false);
hideTimeZone = storage.getBoolean("hideTimeZone", false);
hideHostnameWhenConnecting = storage.getBoolean("hideHostnameWhenConnecting", false);

confirmDelete = storage.getBoolean("confirmDelete", false);
confirmDiscardMessage = storage.getBoolean("confirmDiscardMessage", true);
Expand Down Expand Up @@ -908,14 +905,6 @@ public static void setHideTimeZone(final boolean state) {
hideTimeZone = state;
}

public static boolean hideHostnameWhenConnecting() {
return hideHostnameWhenConnecting;
}

public static void setHideHostnameWhenConnecting(final boolean state) {
hideHostnameWhenConnecting = state;
}

public static String getAttachmentDefaultPath() {
return attachmentDefaultPath;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ public class GlobalSettings {
new V(48, new FontSizeSetting(FontSizes.FONT_DEFAULT))
));
s.put("hideHostnameWhenConnecting", Settings.versions(
new V(49, new BooleanSetting(false))
new V(49, new BooleanSetting(false)),
new V(56, null)
));

SETTINGS = Collections.unmodifiableMap(s);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class Settings {
*
* @see SettingsExporter
*/
public static final int VERSION = 55;
public static final int VERSION = 56;

static Map<String, Object> validate(int version, Map<String, TreeMap<Integer, SettingsDescription>> settings,
Map<String, String> importedSettings, boolean useDefaultValues) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class GeneralSettingsDataStore(
"disable_notifications_during_quiet_time" -> !K9.isNotificationDuringQuietTimeEnabled()
"privacy_hide_useragent" -> K9.hideUserAgent()
"privacy_hide_timezone" -> K9.hideTimeZone()
"privacy_hide_hostname_when_connecting" -> K9.hideHostnameWhenConnecting()
"debug_logging" -> K9.isDebug()
"sensitive_logging" -> K9.DEBUG_SENSITIVE
else -> defValue
Expand Down Expand Up @@ -79,7 +78,6 @@ class GeneralSettingsDataStore(
"disable_notifications_during_quiet_time" -> K9.setNotificationDuringQuietTimeEnabled(!value)
"privacy_hide_useragent" -> K9.setHideUserAgent(value)
"privacy_hide_timezone" -> K9.setHideTimeZone(value)
"privacy_hide_hostname_when_connecting" -> K9.hideHostnameWhenConnecting()
"debug_logging" -> K9.setDebug(value)
"sensitive_logging" -> K9.DEBUG_SENSITIVE = value
else -> return
Expand Down
2 changes: 0 additions & 2 deletions app/ui/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,6 @@ Please submit bug reports, contribute new features and ask questions at
<string name="global_settings_privacy_hide_useragent_detail">Remove K-9 User-Agent from mail headers</string>
<string name="global_settings_privacy_hide_timezone">Hide timezone</string>
<string name="global_settings_privacy_hide_timezone_detail">Use UTC instead of local timezone in mail headers and reply header</string>
<string name="global_settings_privacy_hide_hostname_when_connecting">Hide hostname</string>
<string name="global_settings_privacy_hide_hostname_when_connecting_detail">Identify as \'localhost\' when connecting to SMTP servers</string>
<string name="global_settings_notification_hide_subject_title">Hide subject in notifications</string>
<string name="global_settings_notification_hide_subject_never">Never</string>
<string name="global_settings_notification_hide_subject_when_locked">When device is locked</string>
Expand Down
5 changes: 0 additions & 5 deletions app/ui/src/main/res/xml/general_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -368,11 +368,6 @@
android:summary="@string/global_settings_privacy_hide_timezone_detail"
android:title="@string/global_settings_privacy_hide_timezone" />

<CheckBoxPreference
android:key="privacy_hide_hostname_when_connecting"
android:summary="@string/global_settings_privacy_hide_hostname_when_connecting_detail"
android:title="@string/global_settings_privacy_hide_hostname_when_connecting" />

</PreferenceScreen>

<PreferenceScreen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,4 @@ public interface StoreConfig {
int getDisplayCount();

int getIdleRefreshMinutes();

boolean shouldHideHostname();
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public void open__shouldProvideHostname() throws Exception {
server.expect("EHLO [127.0.0.1]");
server.output("250-localhost Hello client.localhost");
server.output("250 OK");
when(storeConfig.shouldHideHostname()).thenReturn(true);
SmtpTransport transport = startServerAndCreateSmtpTransport(server, AuthType.PLAIN, ConnectionSecurity.NONE,
null, "[127.0.0.1]");

Expand Down

0 comments on commit 4333a3a

Please sign in to comment.