diff options
author | Sean Leonard <meanderingcode@aetherislands.net> | 2013-11-13 17:19:46 -0800 |
---|---|---|
committer | Sean Leonard <meanderingcode@aetherislands.net> | 2013-11-13 17:19:46 -0800 |
commit | 3c5f545eee991c545724911664297bb3fe9f3680 (patch) | |
tree | 18239a3067ebb1f6f1bec4fe891c7059167a55d5 /src/se/leap/bitmaskclient/ConfigHelper.java | |
parent | 5e2588f199edef2c54d6357c53e4bcbcb148d5a9 (diff) | |
parent | cc794fbbb09b2ff9fdcaaf199dbaa4816a92df87 (diff) |
Merge branch 'bug/overly-complex-certificate-verification-method' into develop
Diffstat (limited to 'src/se/leap/bitmaskclient/ConfigHelper.java')
-rw-r--r-- | src/se/leap/bitmaskclient/ConfigHelper.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/se/leap/bitmaskclient/ConfigHelper.java b/src/se/leap/bitmaskclient/ConfigHelper.java index b916a9ac..d2253dfe 100644 --- a/src/se/leap/bitmaskclient/ConfigHelper.java +++ b/src/se/leap/bitmaskclient/ConfigHelper.java @@ -178,6 +178,18 @@ public class ConfigHelper { shared_preferences_editor.remove(shared_preferences_key); return shared_preferences_editor.commit(); } + + public static boolean checkErroneousDownload(String downloaded_string) { + try { + if(new JSONObject(downloaded_string).has(ProviderAPI.ERRORS) || downloaded_string.isEmpty()) { + return true; + } else { + return false; + } + } catch(JSONException e) { + return false; + } + } /** * Treat the input as the MSB representation of a number, |