From 8f37e6f940ae4034458a1d9d39dc5ffe4ff70848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 20 Nov 2014 19:48:54 +0100 Subject: Update gateways after downloading certificate. If the certificate is from an authenticated user, autostart eip. If not, show that the certificate has been updated. --- app/src/main/java/se/leap/bitmaskclient/EIP.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/src/main/java/se/leap/bitmaskclient/EIP.java') diff --git a/app/src/main/java/se/leap/bitmaskclient/EIP.java b/app/src/main/java/se/leap/bitmaskclient/EIP.java index 00a0afb0..0d11847e 100644 --- a/app/src/main/java/se/leap/bitmaskclient/EIP.java +++ b/app/src/main/java/se/leap/bitmaskclient/EIP.java @@ -324,6 +324,7 @@ public final class EIP extends IntentService { } deleteAllVpnProfiles(); updateGateways(); + if(mReceiver != null) mReceiver.send(Activity.RESULT_OK, Bundle.EMPTY); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -394,7 +395,7 @@ public final class EIP extends IntentService { Calendar offset_date = Calendar.getInstance(); try { Date date = certificate_date_format.parse(date_string); - long difference = Math.abs(date.getTime() - certificate.getNotAfter().getTime())/2; + long difference = Math.abs(date.getTime() - certificate.getNotAfter().getTime())/2; long current_date_millis = offset_date.getTimeInMillis(); offset_date.setTimeInMillis(current_date_millis + difference); Log.d(TAG, "certificate not after = " + certificate.getNotAfter()); -- cgit v1.2.3