From 0ad1b398e19a02dd725b253e15f6ded4d0cd641b Mon Sep 17 00:00:00 2001 From: Fup Duck Date: Sat, 27 Jan 2018 04:26:20 +0100 Subject: resolve comments on merge request --- app/src/main/java/se/leap/bitmaskclient/eip/EIP.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'app/src') 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 118622ab..eca5b881 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java @@ -122,8 +122,6 @@ public final class EIP extends IntentService { gateway = gatewaysManager.select(); if (gateway != null && gateway.getProfile() != null) { - // TODO why is this needed? - // mReceiver = EipFragment.getReceiver(); launchActiveGateway(); tellToReceiver(EIP_ACTION_START, Activity.RESULT_OK); } else @@ -143,7 +141,6 @@ public final class EIP extends IntentService { gateway = gatewaysManager.select(); if (gateway != null && gateway.getProfile() != null) { - //mReceiver = EipFragment.getReceiver(); Log.d(TAG, "startAlwaysOnEIP eip launch avtive gateway vpn"); launchActiveGateway(); } else { @@ -225,14 +222,14 @@ public final class EIP extends IntentService { private void gatewaysFromPreferences() { String gatewaysString = preferences.getString(Gateway.TAG, ""); - gatewaysManager = new GatewaysManager(getApplicationContext(), preferences); + gatewaysManager = new GatewaysManager(this, preferences); gatewaysManager.addFromString(gatewaysString); preferences.edit().remove(Gateway.TAG).apply(); } private void gatewaysToPreferences() { String gateways_string = gatewaysManager.toString(); - preferences.edit().putString(Gateway.TAG, gateways_string).apply(); + preferences.edit().putString(Gateway.TAG, gateways_string).commit(); } private void checkCertValidity() { -- cgit v1.2.3