From 39b06f3f5f371f0ec03e20292a81cb514cb6061e Mon Sep 17 00:00:00 2001 From: Fup Duck Date: Tue, 23 Jan 2018 11:10:40 +0100 Subject: new UI for EipFragment --- app/src/main/java/se/leap/bitmaskclient/Dashboard.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'app/src/main/java/se/leap/bitmaskclient/Dashboard.java') diff --git a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java index 5ccb48b5..a14b7d2f 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(); @@ -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); -- cgit v1.2.3 From 3eb5405141d14a0c75c669c168b272878346cc38 Mon Sep 17 00:00:00 2001 From: Fup Duck Date: Sat, 27 Jan 2018 16:09:38 +0100 Subject: fix comments for mergerequest --- app/src/main/java/se/leap/bitmaskclient/Dashboard.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/src/main/java/se/leap/bitmaskclient/Dashboard.java') diff --git a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java index 5ccb48b5..cb781009 100644 --- a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java +++ b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java @@ -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() { @@ -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{ -- cgit v1.2.3