summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/StartActivity.java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2018-02-18 13:24:07 +0100
committercyBerta <cyberta@riseup.net>2018-02-18 13:24:07 +0100
commitbe6b775a7fdb1b8c194bea75ae8f923d9c1b0349 (patch)
treec4c0b41bbe878187fb1344cb3978e097c620b8b4 /app/src/main/java/se/leap/bitmaskclient/StartActivity.java
parent732e1f23d1e00f28ea5e64869737ba2c34e1791e (diff)
parentff319e7862b5b6e1592811aa8c6571c7b9a1631c (diff)
Merge branch 'mirror_0xacab_0.9.8' into #8797_certificate_expiration
* fix merge conflicts in: app/src/main/java/se/leap/bitmaskclient/EipFragment.java app/src/main/java/se/leap/bitmaskclient/eip/EIP.java app/src/main/java/se/leap/bitmaskclient/eip/EipCommand.java
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/StartActivity.java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/StartActivity.java17
1 files changed, 3 insertions, 14 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/StartActivity.java b/app/src/main/java/se/leap/bitmaskclient/StartActivity.java
index 288b157f..39717bd8 100644
--- a/app/src/main/java/se/leap/bitmaskclient/StartActivity.java
+++ b/app/src/main/java/se/leap/bitmaskclient/StartActivity.java
@@ -14,6 +14,7 @@ import java.lang.annotation.RetentionPolicy;
import de.blinkt.openvpn.core.VpnStatus;
import se.leap.bitmaskclient.eip.EIP;
+import se.leap.bitmaskclient.eip.EipCommand;
import se.leap.bitmaskclient.userstatus.User;
import static se.leap.bitmaskclient.Constants.APP_ACTION_CONFIGURE_ALWAYS_ON_PROFILE;
@@ -163,7 +164,7 @@ public class StartActivity extends Activity {
} else {
Log.d(TAG, "vpn provider is configured");
if (getIntent() != null && getIntent().getBooleanExtra(EIP_RESTART_ON_BOOT, false)) {
- eipCommand(EIP_ACTION_START);
+ EipCommand.startVPN(this, true);
finish();
return;
}
@@ -191,7 +192,7 @@ public class StartActivity extends Activity {
if (resultCode == RESULT_OK && data.hasExtra(Provider.KEY)) {
Provider provider = data.getParcelableExtra(Provider.KEY);
ConfigHelper.storeProviderInPreferences(preferences, provider);
- eipCommand(EIP_ACTION_START);
+ EipCommand.startVPN(this, false);
showMainActivity();
} else if (resultCode == RESULT_CANCELED) {
finish();
@@ -207,16 +208,4 @@ public class StartActivity extends Activity {
finish();
}
-
- /**
- * Send a command to EIP
- *
- * @param action A valid String constant from EIP class representing an Intent
- * filter for the EIP class
- */
- private void eipCommand(String action) {
- Intent vpn_intent = new Intent(this.getApplicationContext(), EIP.class);
- vpn_intent.setAction(action);
- this.startService(vpn_intent);
- }
}