summaryrefslogtreecommitdiff
path: root/app/src/debug/java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-04-29 12:25:24 +0200
committerParménides GV <parmegv@sdf.org>2015-04-29 12:26:23 +0200
commitf008b5ec8e1c74968e4a605d2de5423edf91b854 (patch)
treea6e8906aa5d09c24a48f533f6a057a84ee16265e /app/src/debug/java
parent6cc1443a27a4be762e4b53deb464d15a99d698ac (diff)
Creating a user session fragment.
I've separated the user session management to it, and encapsulated ProviderAPICommand into its own class. Putting the fragment statically in dashboard.xml isn't working, Android complains about it being duplicated, so I'm going to add it dynamically.
Diffstat (limited to 'app/src/debug/java')
-rw-r--r--app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java4
-rw-r--r--app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java3
2 files changed, 4 insertions, 3 deletions
diff --git a/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java b/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java
index 12a2b239..4a75b49c 100644
--- a/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java
+++ b/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java
@@ -40,6 +40,7 @@ import se.leap.bitmaskclient.ProviderAPIResultReceiver.Receiver;
import se.leap.bitmaskclient.ProviderDetailFragment.ProviderDetailFragmentInterface;
import se.leap.bitmaskclient.ProviderListContent.ProviderItem;
import se.leap.bitmaskclient.eip.*;
+import se.leap.bitmaskclient.userstatus.SessionDialog;
/**
* Activity that builds and shows the list of known available providers.
@@ -201,8 +202,6 @@ public class ConfigurationWizard extends Activity
preferences.edit().remove(Provider.KEY).apply();
setting_up_provider = false;
- setResult(RESULT_CANCELED, mConfigState);
-
String reason_to_fail = resultData.getString(ProviderAPI.ERRORS);
showDownloadFailedDialog(reason_to_fail);
} else if (resultCode == ProviderAPI.CORRECTLY_DOWNLOADED_CERTIFICATE) {
@@ -214,7 +213,6 @@ public class ConfigurationWizard extends Activity
hideProgressBar();
cancelSettingUpProvider();
Toast.makeText(getApplicationContext(), R.string.provider_problem, Toast.LENGTH_LONG).show();
- setResult(RESULT_CANCELED, mConfigState);
} else if (resultCode == AboutActivity.VIEWED) {
// Do nothing, right now
// I need this for CW to wait for the About activity to end before going back to Dashboard.
diff --git a/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java b/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java
index 5d94d180..0896f9ec 100644
--- a/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java
+++ b/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java
@@ -38,6 +38,9 @@ import javax.net.ssl.*;
import se.leap.bitmaskclient.ProviderListContent.*;
import se.leap.bitmaskclient.eip.*;
+import se.leap.bitmaskclient.userstatus.SessionDialog;
+import se.leap.bitmaskclient.userstatus.User;
+import se.leap.bitmaskclient.userstatus.UserSessionStatus;
/**
* Implements HTTP api methods used to manage communications with the provider server.