summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-07-02 20:19:36 +0200
committerParménides GV <parmegv@sdf.org>2014-07-02 20:19:36 +0200
commit70aa1258b34bf277595a7e5178e6fb914d10f13b (patch)
tree4765ee146e6a48f728c68c4f3c1e5d40bbbadde1 /app
parentca9952b324d153d1580f73ce8c999542ec1883c5 (diff)
If authentication fails, restart eip.
This happens when we update the openvpn certificate, in the first connection attempt.
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java b/app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java
index 200e25e6..5a5bb568 100644
--- a/app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java
@@ -169,8 +169,12 @@ public class EipServiceFragment extends Fragment implements StateListener, OnChe
}
}
else {
- if(!eipSwitch.isChecked())
- eipStatus.setText(R.string.state_noprocess);
+ if(!eipSwitch.isChecked()) {
+ if(getActivity().getSharedPreferences(Dashboard.SHARED_PREFERENCES, Activity.MODE_PRIVATE).getString(EIP.STATUS, "").equalsIgnoreCase(ConnectionStatus.LEVEL_AUTH_FAILED.toString()))
+ startEipFromScratch();
+ else
+ eipStatus.setText(R.string.state_noprocess);
+ }
}
eipAutoSwitched = true;
saveEipStatus();