From 1fcf003abf27b58047d59a3f8ac4787987de2ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Wed, 12 Nov 2014 03:58:03 +0100 Subject: Smaller method. --- app/src/main/java/se/leap/bitmaskclient/eip/EIP.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'app/src/main/java') diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java index 92eba23c..94027491 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java @@ -73,7 +73,6 @@ public final class EIP extends IntentService { super.onCreate(); context = getApplicationContext(); - preferences = getSharedPreferences(Dashboard.SHARED_PREFERENCES, MODE_PRIVATE); refreshEipDefinition(); } @@ -254,14 +253,9 @@ public final class EIP extends IntentService { } private void checkCertValidity() { - Bundle result = new Bundle(); - result.putString(REQUEST_TAG, ACTION_CHECK_CERT_VALIDITY); - VpnCertificateValidator validator = new VpnCertificateValidator(); - if(validator.isValid(preferences.getString(CERTIFICATE, ""))) - mReceiver.send(Activity.RESULT_OK, result); - else - mReceiver.send(Activity.RESULT_CANCELED, result); + boolean is_valid = validator.isValid(preferences.getString(CERTIFICATE, "")); + tellToReceiver(ACTION_CHECK_CERT_VALIDITY, is_valid); } /** -- cgit v1.2.3