summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
diff options
context:
space:
mode:
authorFup Duck <fupduck@sacknagel.com>2018-01-28 17:45:28 +0100
committerFup Duck <fupduck@sacknagel.com>2018-01-28 17:45:28 +0100
commita1ac4910f062ca8aca06e0468fffef751d3bb714 (patch)
tree392a31c3627b88107ea30f25488989dcaf7a6c70 /app/src/main/java/se/leap/bitmaskclient/Dashboard.java
parent1a25b1dea9ab2d7e76cd79e8928d27f855ca9f2a (diff)
parent298c33b94c8aada449c98a24cdb2c687af40cbbd (diff)
Merge remote-tracking branch '0xacab/0.9.8' into 8826_custom_provider
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/Dashboard.java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/Dashboard.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
index 5ccb48b5..a4db5f84 100644
--- a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
+++ b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
@@ -87,7 +87,7 @@ public class Dashboard extends ButterKnifeActivity {
@InjectView(R.id.providerName)
TextView provider_name;
- private VpnFragment eip_fragment;
+ private EipFragment eip_fragment;
private UserStatusFragment user_status_fragment;
private static Provider provider = new Provider();
@@ -232,7 +232,7 @@ public class Dashboard extends ButterKnifeActivity {
private void handleConfigureAlwaysOn(Intent intent) {
intent.removeExtra(APP_ACTION_CONFIGURE_ALWAYS_ON_PROFILE);
Log.d(TAG, "start Configuration wizard!");
- startActivityForResult(new Intent(this, ConfigurationWizard.class), REQUEST_CODE_CONFIGURE_LEAP);
+ startActivityForResult(new Intent(this, ProviderListActivity.class), REQUEST_CODE_CONFIGURE_LEAP);
}
private void prepareEIP(Bundle savedInstanceState) {
@@ -255,7 +255,7 @@ public class Dashboard extends ButterKnifeActivity {
if (getIntent().hasExtra(APP_ACTION_CONFIGURE_ALWAYS_ON_PROFILE)) {
getIntent().removeExtra(APP_ACTION_CONFIGURE_ALWAYS_ON_PROFILE);
}
- startActivityForResult(new Intent(this, ConfigurationWizard.class), REQUEST_CODE_CONFIGURE_LEAP);
+ startActivityForResult(new Intent(this, ProviderListActivity.class), REQUEST_CODE_CONFIGURE_LEAP);
}
@SuppressLint("CommitPrefEdits")
private void providerToPreferences(Provider provider) {
@@ -273,7 +273,7 @@ public class Dashboard extends ButterKnifeActivity {
.setPositiveButton(getResources().getString(R.string.setup_error_configure_button), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
- startActivityForResult(new Intent(Dashboard.this, ConfigurationWizard.class), REQUEST_CODE_CONFIGURE_LEAP);
+ startActivityForResult(new Intent(Dashboard.this, ProviderListActivity.class), REQUEST_CODE_CONFIGURE_LEAP);
}
})
.setNegativeButton(getResources().getString(R.string.setup_error_close_button), new DialogInterface.OnClickListener() {
@@ -290,8 +290,8 @@ public class Dashboard extends ButterKnifeActivity {
* Inflates permanent UI elements of the View and contains logic for what
* service dependent UI elements to include.
*/
- //TODO: REFACTOR ME! Consider implementing a manager that handles most of VpnFragment's logic about handling EIP commands.
- //This way, we could avoid to create UI elements (like fragmentManager.replace(R.id.servicesCollection, eip_fragment, VpnFragment.TAG); )
+ //TODO: REFACTOR ME! Consider implementing a manager that handles most of EipFragment's logic about handling EIP commands.
+ //This way, we could avoid to create UI elements (like fragmentManager.replace(R.id.servicesCollection, eip_fragment, EipFragment.TAG); )
// just to start services and destroy them afterwards
private void buildDashboard(boolean hideAndTurnOnEipOnBoot) {
setContentView(R.layout.dashboard);
@@ -305,9 +305,9 @@ public class Dashboard extends ButterKnifeActivity {
fragment_manager.replace(R.id.user_status_fragment, user_status_fragment, UserStatusFragment.TAG);
if (provider.hasEIP()) {
- fragment_manager.removePreviousFragment(VpnFragment.TAG);
+ fragment_manager.removePreviousFragment(EipFragment.TAG);
eip_fragment = prepareEipFragment(hideAndTurnOnEipOnBoot);
- fragment_manager.replace(R.id.servicesCollection, eip_fragment, VpnFragment.TAG);
+ fragment_manager.replace(R.id.servicesCollection, eip_fragment, EipFragment.TAG);
if (hideAndTurnOnEipOnBoot) {
onBackPressed();
}
@@ -320,13 +320,13 @@ public class Dashboard extends ButterKnifeActivity {
* has caused to start Dashboard
* @return the created VPNFragment
*/
- public VpnFragment prepareEipFragment(boolean hideAndTurnOnEipOnBoot) {
- VpnFragment eip_fragment = new VpnFragment();
+ public EipFragment prepareEipFragment(boolean hideAndTurnOnEipOnBoot) {
+ EipFragment eip_fragment = new EipFragment();
if (hideAndTurnOnEipOnBoot && !isAlwaysOn()) {
preferences.edit().remove(EIP_RESTART_ON_BOOT).apply();
Bundle arguments = new Bundle();
- arguments.putBoolean(VpnFragment.START_EIP_ON_BOOT, true);
+ arguments.putBoolean(EipFragment.START_EIP_ON_BOOT, true);
Log.d(TAG, "set START_EIP_ON_BOOT argument for eip_fragment");
eip_fragment.setArguments(arguments);
@@ -416,7 +416,7 @@ public class Dashboard extends ButterKnifeActivity {
clearDataOfLastProvider();
switching_provider = false;
- startActivityForResult(new Intent(this, ConfigurationWizard.class), REQUEST_CODE_SWITCH_PROVIDER);
+ startActivityForResult(new Intent(this, ProviderListActivity.class), REQUEST_CODE_SWITCH_PROVIDER);
}
private void clearDataOfLastProvider() {
@@ -441,7 +441,7 @@ public class Dashboard extends ButterKnifeActivity {
preferenceEditor.apply();
switching_provider = false;
- startActivityForResult(new Intent(this, ConfigurationWizard.class), REQUEST_CODE_SWITCH_PROVIDER);
+ startActivityForResult(new Intent(this, ProviderListActivity.class), REQUEST_CODE_SWITCH_PROVIDER);
}
private static class DashboardReceiver implements ProviderAPIResultReceiver.Receiver{