diff options
author | Parménides GV <parmegv@sdf.org> | 2014-07-02 20:19:36 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-07-02 20:19:36 +0200 |
commit | 70aa1258b34bf277595a7e5178e6fb914d10f13b (patch) | |
tree | 4765ee146e6a48f728c68c4f3c1e5d40bbbadde1 /app/src | |
parent | ca9952b324d153d1580f73ce8c999542ec1883c5 (diff) |
If authentication fails, restart eip.
This happens when we update the openvpn certificate, in the first
connection attempt.
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java | 8 |
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(); |