summaryrefslogtreecommitdiff
path: root/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-06-01 10:50:02 +0200
committerParménides GV <parmegv@sdf.org>2015-06-01 10:50:02 +0200
commit21aa11e5e04ffef3111010140cd7336fe181de39 (patch)
tree6af11a281ce9fd4c8e70863d10093d910751bf66 /app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java
parente5e9ac6e43b9cdec0f362711bb33747ab73fc297 (diff)
parent03973cf7f9b0f8635b6835c548b192eb53a2be35 (diff)
Merge branch 'feature/Look-for-a-better-solution-to-the-VPN-slider-#6863' into develop
Diffstat (limited to 'app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java')
-rw-r--r--app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java b/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java
index a96556bc..a3f7db6a 100644
--- a/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java
+++ b/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java
@@ -36,8 +36,10 @@ import org.apache.http.client.*;
import org.json.*;
import org.thoughtcrime.ssl.pinning.util.*;
-import se.leap.bitmaskclient.ProviderListContent.ProviderItem;
import se.leap.bitmaskclient.eip.*;
+import se.leap.bitmaskclient.userstatus.SessionDialog;
+import se.leap.bitmaskclient.userstatus.User;
+import se.leap.bitmaskclient.userstatus.UserStatus;
/**
* Implements HTTP api methods used to manage communications with the provider server.
@@ -141,7 +143,7 @@ public class ProviderAPI extends IntentService {
}
}
} else if (action.equalsIgnoreCase(SIGN_UP)) {
- UserSessionStatus.updateStatus(UserSessionStatus.SessionStatus.SIGNING_UP, resources);
+ UserStatus.updateStatus(UserStatus.SessionStatus.SIGNING_UP, resources);
Bundle result = tryToRegister(parameters);
if (result.getBoolean(RESULT_KEY)) {
receiver.send(SUCCESSFUL_SIGNUP, result);
@@ -149,23 +151,23 @@ public class ProviderAPI extends IntentService {
receiver.send(FAILED_SIGNUP, result);
}
} else if (action.equalsIgnoreCase(LOG_IN)) {
- UserSessionStatus.updateStatus(UserSessionStatus.SessionStatus.LOGGING_IN, resources);
+ UserStatus.updateStatus(UserStatus.SessionStatus.LOGGING_IN, resources);
Bundle result = tryToAuthenticate(parameters);
if (result.getBoolean(RESULT_KEY)) {
receiver.send(SUCCESSFUL_LOGIN, result);
- UserSessionStatus.updateStatus(UserSessionStatus.SessionStatus.LOGGED_IN, resources);
+ UserStatus.updateStatus(UserStatus.SessionStatus.LOGGED_IN, resources);
} else {
receiver.send(FAILED_LOGIN, result);
- UserSessionStatus.updateStatus(UserSessionStatus.SessionStatus.NOT_LOGGED_IN, resources);
+ UserStatus.updateStatus(UserStatus.SessionStatus.NOT_LOGGED_IN, resources);
}
} else if (action.equalsIgnoreCase(LOG_OUT)) {
- UserSessionStatus.updateStatus(UserSessionStatus.SessionStatus.LOGGING_OUT, resources);
+ UserStatus.updateStatus(UserStatus.SessionStatus.LOGGING_OUT, resources);
if (logOut()) {
receiver.send(SUCCESSFUL_LOGOUT, Bundle.EMPTY);
- UserSessionStatus.updateStatus(UserSessionStatus.SessionStatus.LOGGED_OUT, resources);
+ UserStatus.updateStatus(UserStatus.SessionStatus.LOGGED_OUT, resources);
} else {
receiver.send(LOGOUT_FAILED, Bundle.EMPTY);
- UserSessionStatus.updateStatus(UserSessionStatus.SessionStatus.DIDNT_LOG_OUT, resources);
+ UserStatus.updateStatus(UserStatus.SessionStatus.DIDNT_LOG_OUT, resources);
}
} else if (action.equalsIgnoreCase(DOWNLOAD_CERTIFICATE)) {
if (updateVpnCertificate()) {