1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-22 12:22:08 +01:00

setupUI before applying proxy settings to mitigate nullpointer on WebView

This commit is contained in:
vanitasvitae 2016-09-11 13:06:13 +02:00
parent 0b0b0198df
commit 916ee58690

View file

@ -187,6 +187,8 @@ public class MainActivity extends AppCompatActivity
podUserProfile.setListener(this); podUserProfile.setListener(this);
urls = new DiasporaUrlHelper(appSettings); urls = new DiasporaUrlHelper(appSettings);
setupUI(savedInstanceState);
if (appSettings.isProxyEnabled()) { if (appSettings.isProxyEnabled()) {
if (!setProxy(appSettings.getProxyHost(), appSettings.getProxyPort())) { if (!setProxy(appSettings.getProxyHost(), appSettings.getProxyPort())) {
Log.d(App.TAG, "Could not enable Proxy"); Log.d(App.TAG, "Could not enable Proxy");
@ -195,8 +197,6 @@ public class MainActivity extends AppCompatActivity
} else if (appSettings.wasProxyEnabled()) { } else if (appSettings.wasProxyEnabled()) {
resetProxy(); resetProxy();
} }
setupUI(savedInstanceState);
} }
private void setupUI(Bundle savedInstanceState) { private void setupUI(Bundle savedInstanceState) {