From a9904f63729fc01c6f7c4fe767cf9540f7405360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Mon, 2 Sep 2013 20:12:26 +0200 Subject: Label for the CW progressbar. --- res/layout/configuration_wizard_activity.xml | 11 +++++++++++ res/values/strings.xml | 4 ++-- src/se/leap/bitmaskclient/ConfigurationWizard.java | 16 ++++++++++++++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/res/layout/configuration_wizard_activity.xml b/res/layout/configuration_wizard_activity.xml index b80294ba..f3d0e48b 100644 --- a/res/layout/configuration_wizard_activity.xml +++ b/res/layout/configuration_wizard_activity.xml @@ -11,5 +11,16 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:max="3" /> + + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index ba05b19b..dde3ad3f 100755 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -222,8 +222,7 @@ Be sure to also check out the FAQ. There is a quick start guide. Convert remote-tls format from OpenVPN 2.2 to 2.3 format Routing/Interface Configuration - The Routing and interface configuration is not done via traditionell ifconfig/route command but by using the VPNService API. This results in a different routing configuration than on other OSes. The configuration only consists of the IP of the tunnel interface and the networks that should be routed over this interface. Especially no peer partner address or gateway address is needed. Special routes to reach the VPN Server (for example added when using redirect-gateway) are not needed either. The application will consequently ignore these settings when importing a configuration. The app ensures with the VPNService API that the connection to the server is not routed through the VPN tunnel. Since only specifing networks to be routed via tunnel is supported extra routes not pointing to the tunnel cannot be supported either. (e.g. route x.x.x.x y.y.y.y net_gateway). The show information button in the log windows show the current configuration of the VPNService network configuration. + The Routing and interface configuration is not done via traditionell ifconfig/route command but by using the VPNService API. This results in a different routing configuration than on other OSes. The configuration only consists of the IP of the tunnel interface and the networks that should be routed over this interface. Especially no peer partner address or gateway address is needed. Special routes to reach the VPN Server (for example added when using redirect-gateway) are not needed either. The application will consequently ignore these settings when importing a configuration. The app ensures with the VPNService API that the connection to the server is not routed through the VPN tunnel. Since only specifing networks to be routed via tunnel is supported extra routes not pointing to the tunnel cannot be supported either. (e.g. route x.x.x.x y.y.y.y net_gateway). The show information button in the log windows show the current configuration of the VPNService network configuration. Do not fallback to no VPN connection when OpenVPN is reconnecting. Persistent tun Translation @@ -308,6 +307,7 @@ string> Server is down. It doesn\'t seem to be a Bitmask provider. This is not a trusted Bitmask provider. + Configuring provider Authenticating Authenticating with entered login and password. Log out diff --git a/src/se/leap/bitmaskclient/ConfigurationWizard.java b/src/se/leap/bitmaskclient/ConfigurationWizard.java index 94400eaa..5839816b 100644 --- a/src/se/leap/bitmaskclient/ConfigurationWizard.java +++ b/src/se/leap/bitmaskclient/ConfigurationWizard.java @@ -46,7 +46,9 @@ import android.view.View.MeasureSpec; import android.view.WindowManager; import android.widget.ListAdapter; import android.widget.ListView; +import android.widget.ProgressBar; import android.widget.RelativeLayout; +import android.widget.TextView; /** * Activity that builds and shows the list of known available providers. @@ -61,6 +63,7 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn private ProviderItem mSelectedProvider; private ProgressBar mProgressBar; + private TextView progressbar_description; private ProviderListFragment provider_list_fragment; private Intent mConfigState = new Intent(); @@ -80,7 +83,8 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn setContentView(R.layout.configuration_wizard_activity); mProgressBar = (ProgressBar) findViewById(R.id.progressbar_configuration_wizard); mProgressBar.setVisibility(ProgressBar.INVISIBLE); - + progressbar_description = (TextView) findViewById(R.id.progressbar_description); + progressbar_description.setVisibility(TextView.INVISIBLE); providerAPI_result_receiver = new ProviderAPIResultReceiver(new Handler()); providerAPI_result_receiver.setReceiver(this); @@ -158,6 +162,7 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn // TODO Auto-generated catch block e.printStackTrace(); mProgressBar.setVisibility(ProgressBar.GONE); + progressbar_description.setVisibility(TextView.GONE); refreshProviderList(0); //Toast.makeText(this, getResources().getString(R.string.config_error_parsing), Toast.LENGTH_LONG); setResult(RESULT_CANCELED, mConfigState); @@ -168,6 +173,7 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn showDownloadFailedDialog(getCurrentFocus(), reason_to_fail); refreshProviderList(0); mProgressBar.setVisibility(ProgressBar.GONE); + progressbar_description.setVisibility(TextView.GONE); setResult(RESULT_CANCELED, mConfigState); } else if(resultCode == ProviderAPI.CORRECTLY_DOWNLOADED_JSON_FILES) { @@ -178,6 +184,7 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn } else { mProgressBar.incrementProgressBy(1); mProgressBar.setVisibility(ProgressBar.GONE); + progressbar_description.setVisibility(TextView.GONE); refreshProviderList(0); //Toast.makeText(getApplicationContext(), R.string.success, Toast.LENGTH_LONG).show(); setResult(RESULT_OK); @@ -191,17 +198,20 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn refreshProviderList(0); //Toast.makeText(getApplicationContext(), R.string.incorrectly_downloaded_json_files_message, mProgressBar.setVisibility(ProgressBar.GONE); + progressbar_description.setVisibility(TextView.GONE); setResult(RESULT_CANCELED, mConfigState); } else if(resultCode == ProviderAPI.CORRECTLY_DOWNLOADED_CERTIFICATE) { mProgressBar.incrementProgressBy(1); mProgressBar.setVisibility(ProgressBar.GONE); + progressbar_description.setVisibility(TextView.GONE); //refreshProviderList(0); setResult(RESULT_OK); showProviderDetails(getCurrentFocus()); } else if(resultCode == ProviderAPI.INCORRECTLY_DOWNLOADED_CERTIFICATE) { - refreshProviderList(0); + //refreshProviderList(0); mProgressBar.setVisibility(ProgressBar.GONE); + progressbar_description.setVisibility(TextView.GONE); //Toast.makeText(getApplicationContext(), R.string.incorrectly_downloaded_certificate_message, Toast.LENGTH_LONG).show(); setResult(RESULT_CANCELED, mConfigState); } @@ -254,10 +264,12 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn private void startProgressBar(int list_item_index) { mProgressBar.setVisibility(ProgressBar.VISIBLE); + progressbar_description.setVisibility(TextView.VISIBLE); mProgressBar.setProgress(0); mProgressBar.setMax(3); int measured_height = listItemHeight(list_item_index); mProgressBar.setTranslationY(measured_height); + progressbar_description.setTranslationY(measured_height + mProgressBar.getHeight()); } private int getProviderIndex(String id) { -- cgit v1.2.3