diff options
Diffstat (limited to 'app')
3 files changed, 13 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java index f8db33f3..6f18b79a 100644 --- a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java +++ b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java @@ -291,6 +291,15 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf EipServiceFragment eipFragment = (EipServiceFragment) getFragmentManager().findFragmentByTag(EipServiceFragment.TAG); eipFragment.checkEipSwitch(false); } + + public void cancelLoginOrSignup() { + if(mProgressBar == null) mProgressBar = (ProgressBar) findViewById(R.id.eipProgress); + if(mProgressBar != null) { + mProgressBar.setVisibility(ProgressBar.GONE); + if(eipStatus == null) eipStatus = (TextView) findViewById(R.id.eipStatus); + if(eipStatus != null) eipStatus.setText(""); + } + } /** * Asks ProviderAPI to log out. diff --git a/app/src/main/java/se/leap/bitmaskclient/LogInDialog.java b/app/src/main/java/se/leap/bitmaskclient/LogInDialog.java index a28c9049..da74958d 100644 --- a/app/src/main/java/se/leap/bitmaskclient/LogInDialog.java +++ b/app/src/main/java/se/leap/bitmaskclient/LogInDialog.java @@ -99,6 +99,7 @@ public class LogInDialog extends DialogFragment { .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); + interface_with_Dashboard.cancelLoginOrSignup(); } }); @@ -119,6 +120,7 @@ public class LogInDialog extends DialogFragment { */ public void authenticate(String username, String password); public void cancelAuthedEipOn(); + public void cancelLoginOrSignup(); } LogInDialogInterface interface_with_Dashboard; diff --git a/app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java b/app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java index 601df843..2ba65c5d 100644 --- a/app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java +++ b/app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java @@ -98,6 +98,7 @@ public class SignUpDialog extends DialogFragment { .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); + interface_with_Dashboard.cancelLoginOrSignup(); } }); @@ -118,6 +119,7 @@ public class SignUpDialog extends DialogFragment { */ public void signUp(String username, String password); public void cancelAuthedEipOn(); + public void cancelLoginOrSignup(); } SignUpDialogInterface interface_with_Dashboard; |