diff options
author | cyberta <cyberta@riseup.net> | 2018-02-16 04:02:13 -0800 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2018-02-16 04:02:13 -0800 |
commit | ff319e7862b5b6e1592811aa8c6571c7b9a1631c (patch) | |
tree | d3abb15ef5d5f78a2adaf77a9c18af4b7bef1d1e /app/src/main/java/se/leap/bitmaskclient/StartActivity.java | |
parent | 0365f243fc56112b2f43b35e1b4884d2d1ad2aa4 (diff) | |
parent | 5564c4e5801529f846fa88e9258859f6aac4da1d (diff) |
Merge branch '#8831_progress_animation_when_connecting' into '0.9.8'
#8831 progress animation when connecting
See merge request leap/bitmask_android!43
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/StartActivity.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/StartActivity.java | 17 |
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); - } } |