1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-24 21:32:07 +01:00

Fixed bug where appSettings.getProxyHttpPort() always returned 0

This commit is contained in:
vanitasvitae 2016-10-18 19:04:04 +02:00
parent 722204c6a4
commit f1bab5d2c1
Signed by: vanitasvitae
GPG key ID: DCCFB3302C9E4615

View file

@ -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) {