From f1bab5d2c1125311cb6efe47538ae031dbeb7ab8 Mon Sep 17 00:00:00 2001 From: vanitasvitae Date: Tue, 18 Oct 2016 19:04:04 +0200 Subject: [PATCH] Fixed bug where appSettings.getProxyHttpPort() always returned 0 --- .../com/github/dfa/diaspora_android/data/AppSettings.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/github/dfa/diaspora_android/data/AppSettings.java b/app/src/main/java/com/github/dfa/diaspora_android/data/AppSettings.java index c593d0cf..5aad5ab5 100644 --- a/app/src/main/java/com/github/dfa/diaspora_android/data/AppSettings.java +++ b/app/src/main/java/com/github/dfa/diaspora_android/data/AppSettings.java @@ -21,6 +21,7 @@ import android.content.SharedPreferences; import com.github.dfa.diaspora_android.R; import com.github.dfa.diaspora_android.data.DiasporaPodList.DiasporaPod; import com.github.dfa.diaspora_android.data.DiasporaPodList.DiasporaPod.DiasporaPodUrl; +import com.github.dfa.diaspora_android.util.AppLog; import com.github.dfa.diaspora_android.util.ProxyHandler; import org.json.JSONException; @@ -310,12 +311,7 @@ public class AppSettings { * @return proxy port */ public int getProxyPort() { - try { - return Integer.parseInt(getString(prefApp, R.string.pref_key__http_proxy_port, "0")); - } catch (Exception e) { - setString(prefApp, R.string.pref_key__http_proxy_port, "0"); - return 0; - } + return getInt(prefApp, R.string.pref_key__http_proxy_port, 0); } public void setProxyHttpPort(int value) {