summaryrefslogtreecommitdiff
path: root/src/se/leap
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-07-09 17:35:59 +0200
committercyBerta <richy@cyborgsociety.org>2013-11-15 23:14:47 +0100
commitea05c4bc15c8b1e96782706340412160364ebdc9 (patch)
treed5cadfd0a2c5ee413c3465ba98d84abfabfe963f /src/se/leap
parent60e56246f95adca94e9dce02e193e5217e372d5a (diff)
Dashboard progressbar lives below the status line.
I've renamed configuration wizard progressbar, because both had the same name and that provoked a conflict.
Diffstat (limited to 'src/se/leap')
-rw-r--r--src/se/leap/bitmaskclient/ConfigurationWizard.java2
-rw-r--r--src/se/leap/bitmaskclient/Dashboard.java24
-rw-r--r--src/se/leap/bitmaskclient/ProviderAPI.java1
3 files changed, 20 insertions, 7 deletions
diff --git a/src/se/leap/bitmaskclient/ConfigurationWizard.java b/src/se/leap/bitmaskclient/ConfigurationWizard.java
index ea85361d..fa944645 100644
--- a/src/se/leap/bitmaskclient/ConfigurationWizard.java
+++ b/src/se/leap/bitmaskclient/ConfigurationWizard.java
@@ -70,7 +70,7 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn
super.onCreate(savedInstanceState);
setContentView(R.layout.configuration_wizard_activity);
- mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
+ mProgressBar = (ProgressBar) findViewById(R.id.progressbar_configuration_wizard);
mProgressBar.setVisibility(ProgressBar.INVISIBLE);
providerAPI_result_receiver = new ProviderAPIResultReceiver(new Handler());
diff --git a/src/se/leap/bitmaskclient/Dashboard.java b/src/se/leap/bitmaskclient/Dashboard.java
index ec1d32c9..7b47c667 100644
--- a/src/se/leap/bitmaskclient/Dashboard.java
+++ b/src/se/leap/bitmaskclient/Dashboard.java
@@ -41,6 +41,11 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
+import android.view.ViewStub;
+import android.widget.CompoundButton;
+import android.widget.ProgressBar;
+import android.widget.RelativeLayout;
+import android.widget.Switch;
import android.widget.TextView;
import android.widget.Toast;
@@ -49,6 +54,7 @@ import android.widget.Toast;
* and access to preferences.
*
* @author Sean Leonard <meanderingcode@aetherislands.net>
+ * @author parmegv
*/
public class Dashboard extends Activity implements LogInDialog.LogInDialogInterface,Receiver {
@@ -59,7 +65,7 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf
final public static String ACTION_QUIT = "quit";
private ProgressDialog mProgressDialog;
-
+ private ProgressBar mProgressBar;
private static Context app;
private static SharedPreferences preferences;
private static Provider provider;
@@ -77,6 +83,8 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf
app = this;
PRNGFixes.apply();
+ mProgressBar = (ProgressBar) findViewById(R.id.progressbar_dashboard);
+
ConfigHelper.setSharedPreferences(getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE));
preferences = ConfigHelper.shared_preferences;
@@ -236,8 +244,9 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf
provider_API_command.putExtra(ProviderAPI.PARAMETERS, parameters);
provider_API_command.putExtra(ProviderAPI.RECEIVER_KEY, providerAPI_result_receiver);
- if(mProgressDialog != null) mProgressDialog.dismiss();
- mProgressDialog = ProgressDialog.show(this, getResources().getString(R.string.authenticating_title), getResources().getString(R.string.authenticating_message), true);
+ //if(mProgressDialog != null) mProgressDialog.dismiss();
+ mProgressBar.setVisibility(ProgressBar.VISIBLE);
+ //mProgressDialog = ProgressDialog.show(this, getResources().getString(R.string.authenticating_title), getResources().getString(R.string.authenticating_message), true);
startService(provider_API_command);
}
@@ -316,6 +325,7 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf
String session_id_cookie_key = resultData.getString(ProviderAPI.SESSION_ID_COOKIE_KEY);
String session_id_string = resultData.getString(ProviderAPI.SESSION_ID_KEY);
setResult(RESULT_OK);
+
authed_eip = true;
<<<<<<< HEAD:src/se/leap/bitmaskclient/Dashboard.java
ConfigHelper.saveSharedPref(EIP.AUTHED_EIP, authed_eip);
@@ -324,11 +334,13 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf
>>>>>>> 53c2704... Authenticated status remembered after exit.:src/se/leap/leapclient/Dashboard.java
invalidateOptionsMenu();
- //Cookie session_id = new BasicClientCookie(session_id_cookie_key, session_id_string);
- downloadAuthedUserCertificate(/*session_id*/);
+ mProgressBar.setVisibility(ProgressBar.GONE);
+
+ //Cookie session_id = new BasicClientCookie(session_id_cookie_key, session_id_string);
+ downloadAuthedUserCertificate(/*session_id*/);
} else if(resultCode == ProviderAPI.SRP_AUTHENTICATION_FAILED) {
- mProgressDialog.dismiss();
logInDialog(getCurrentFocus(), resultData);
+ mProgressBar.setVisibility(ProgressBar.GONE);
} else if(resultCode == ProviderAPI.LOGOUT_SUCCESSFUL) {
authed_eip = false;
<<<<<<< HEAD:src/se/leap/bitmaskclient/Dashboard.java
diff --git a/src/se/leap/bitmaskclient/ProviderAPI.java b/src/se/leap/bitmaskclient/ProviderAPI.java
index 6ed3a294..e56c6ca9 100644
--- a/src/se/leap/bitmaskclient/ProviderAPI.java
+++ b/src/se/leap/bitmaskclient/ProviderAPI.java
@@ -68,6 +68,7 @@ import android.os.Handler;
import android.os.ResultReceiver;
import android.util.Base64;
import android.util.Log;
+import android.widget.ProgressBar;
import android.widget.Toast;
/**