From 301adeab4b1630645e53baa982b35cba394e52b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Mon, 17 Nov 2014 18:44:36 +0100 Subject: Update vpn certificate and store it correctly. One more onReceiveResult for Dashboard, that method needs a rethink: a statemachine class, and a simple "next()" method? The reality is that the onReceiveResult specifies a linked process, and that should have a better model than a series of if/else cases with strings comparisons hehehe --- app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'app/src/debug/java/se') diff --git a/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java b/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java index 03cbda0c..a89ef357 100644 --- a/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java +++ b/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java @@ -861,23 +861,13 @@ public class ProviderAPI extends IntentService { } return true; } - - private boolean updateVpnCertificate() { - getNewCert(); - - Intent updateEIP = new Intent(getApplicationContext(), EIP.class); - updateEIP.setAction(Constants.ACTION_UPDATE_EIP_SERVICE); - startService(updateEIP); - - return true; - } /** * Downloads a new OpenVPN certificate, attaching authenticated cookie for authenticated certificate. * * @return true if certificate was downloaded correctly, false if provider.json or danger_on flag are not present in SharedPreferences, or if the certificate url could not be parsed as a URI, or if there was an SSL error. */ - private boolean getNewCert() { + private boolean updateVpnCertificate() { try { JSONObject provider_json = new JSONObject(preferences.getString(Provider.KEY, "")); -- cgit v1.2.3