summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorvbh <56578479+vbh@users.noreply.github.com>2021-10-24 09:42:00 +0000
committerGitHub <noreply@github.com>2021-10-24 11:42:00 +0200
commitbf95bf172d245be583c2db082d46fb7c27315718 (patch)
tree81bc650215809c090c0fffdcd732b984822b68f5 /core
parentb860ee33d0d5a3f0543697a3348bc1eb8f614965 (diff)
downloadAntennaPod-bf95bf172d245be583c2db082d46fb7c27315718.zip
Don't forget proxy settings when disabling proxy (#5471)
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java
index 4ff6527ab..9bfad9959 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java
@@ -610,6 +610,11 @@ public class UserPreferences {
public static void setProxyConfig(ProxyConfig config) {
SharedPreferences.Editor editor = prefs.edit();
editor.putString(PREF_PROXY_TYPE, config.type.name());
+ Proxy.Type type = Proxy.Type.valueOf(config.type.name());
+ if (type == Proxy.Type.DIRECT) {
+ editor.apply();
+ return;
+ }
if(TextUtils.isEmpty(config.host)) {
editor.remove(PREF_PROXY_HOST);
} else {