diff options
Diffstat (limited to 'src/se/leap/bitmaskclient/Dashboard.java')
-rw-r--r-- | src/se/leap/bitmaskclient/Dashboard.java | 24 |
1 files changed, 18 insertions, 6 deletions
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 |