From fdc8d5376c6d44c2a78ee023e89417cddabfbd44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 5 Sep 2013 17:40:36 +0200 Subject: Moved all constants from ConfigHelper. They have been relocated to the corresponding classes. --- src/se/leap/openvpn/LaunchVPN.java | 6 +++--- src/se/leap/openvpn/VpnProfile.java | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/se/leap/openvpn') diff --git a/src/se/leap/openvpn/LaunchVPN.java b/src/se/leap/openvpn/LaunchVPN.java index 1df6be96..73003c7e 100644 --- a/src/se/leap/openvpn/LaunchVPN.java +++ b/src/se/leap/openvpn/LaunchVPN.java @@ -106,7 +106,7 @@ public class LaunchVPN extends ListActivity implements OnItemClickListener { final String action = intent.getAction(); // If something wants feedback, they sent us a Receiver - mReceiver = intent.getParcelableExtra(ConfigHelper.RECEIVER_TAG); + mReceiver = intent.getParcelableExtra(EIP.RECEIVER_TAG); // If the intent is a request to create a shortcut, we'll do that and exit @@ -285,7 +285,7 @@ public class LaunchVPN extends ListActivity implements OnItemClickListener { // User does not want us to start, so we just vanish (well, now we tell our receiver, then vanish) Bundle resultData = new Bundle(); // For now, nothing else is calling, so this "request" string is good enough - resultData.putString(ConfigHelper.REQUEST_TAG, EIP.ACTION_START_EIP); + resultData.putString(EIP.REQUEST_TAG, EIP.ACTION_START_EIP); mReceiver.send(RESULT_CANCELED, resultData); finish(); } @@ -373,7 +373,7 @@ public class LaunchVPN extends ListActivity implements OnItemClickListener { // Tell whom-it-may-concern that we started VPN Bundle resultData = new Bundle(); // For now, nothing else is calling, so this "request" string is good enough - resultData.putString(ConfigHelper.REQUEST_TAG, EIP.ACTION_START_EIP); + resultData.putString(EIP.REQUEST_TAG, EIP.ACTION_START_EIP); mReceiver.send(RESULT_OK, resultData); finish(); diff --git a/src/se/leap/openvpn/VpnProfile.java b/src/se/leap/openvpn/VpnProfile.java index 2262f565..5752081a 100644 --- a/src/se/leap/openvpn/VpnProfile.java +++ b/src/se/leap/openvpn/VpnProfile.java @@ -22,6 +22,8 @@ import org.spongycastle.util.io.pem.PemObject; import org.spongycastle.util.io.pem.PemWriter; import se.leap.leapclient.ConfigHelper; +import se.leap.leapclient.EIP; +import se.leap.leapclient.Provider; import se.leap.leapclient.R; import android.content.Context; @@ -246,9 +248,9 @@ public class VpnProfile implements Serializable{ cfg+=insertFileData("cert",mClientCertFilename); */ // FIXME This is all we need...The whole switch statement can go... - cfg+="\n"+ConfigHelper.getStringFromSharedPref(ConfigHelper.MAIN_CERT_KEY)+"\n\n"; - cfg+="\n"+ConfigHelper.getStringFromSharedPref(ConfigHelper.KEY_KEY)+"\n\n"; - cfg+="\n"+ConfigHelper.getStringFromSharedPref(ConfigHelper.CERT_KEY)+"\n\n"; + cfg+="\n"+ConfigHelper.getStringFromSharedPref(Provider.CA_CERT)+"\n\n"; + cfg+="\n"+ConfigHelper.getStringFromSharedPref(EIP.PRIVATE_KEY)+"\n\n"; + cfg+="\n"+ConfigHelper.getStringFromSharedPref(EIP.CERTIFICATE)+"\n\n"; break; case VpnProfile.TYPE_USERPASS_PKCS12: -- cgit v1.2.3