diff options
author | cyBerta <cyberta@riseup.net> | 2022-05-20 13:02:23 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2022-05-20 13:02:23 +0200 |
commit | 2ba5e0faa0e576703fa80b36a480e93a0a7a26b6 (patch) | |
tree | 649d88ae05b1e2c569253e71ff1760af1c7d9f5f /app/src/main/java/se/leap | |
parent | c36a41c7072f799d019c2ed0abed030ee3db1bc9 (diff) |
fix typo and parse string from error result json object more gracefully
Diffstat (limited to 'app/src/main/java/se/leap')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java b/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java index b1bf8cb5..9d67340e 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java @@ -237,8 +237,8 @@ public class EipSetupObserver extends BroadcastReceiver implements VpnStatus.Sta case TOR_EXCEPTION: try { JSONObject jsonObject = new JSONObject(resultData.getString(ProviderAPI.ERRORS)); - String initalAction = jsonObject.getString(ProviderAPI.INITIAL_ACTION); - if (UPDATE_INVALID_VPN_CERTIFICATE.equals(initalAction)) { + String initialAction = jsonObject.optString(ProviderAPI.INITIAL_ACTION); + if (UPDATE_INVALID_VPN_CERTIFICATE.equals(initialAction)) { EipStatus.getInstance().setUpdatingVpnCert(false); } } catch (Exception e) { |