summaryrefslogtreecommitdiff
path: root/app/src/release/java/se
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-01-30 12:01:04 +0100
committerParménides GV <parmegv@sdf.org>2015-01-30 12:01:04 +0100
commita3daa40aaa1a0de39ed6fd6bc7684b24d7787708 (patch)
tree77565f7d76bfc2b1bd734bd2e216169f2d657547 /app/src/release/java/se
parent1ad87b35085616d645fdae18bb03cbead03bd6c9 (diff)
parent7d046fda66e8933b509b854077b7acfb3b3b7c40 (diff)
Merge branch 'bug/Sign-up-crashes-on-big-devices-#6672' into develop
Diffstat (limited to 'app/src/release/java/se')
-rw-r--r--app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java b/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java
index 334efaa9..c8efe0de 100644
--- a/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java
+++ b/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java
@@ -174,28 +174,28 @@ public class ProviderAPI extends IntentService {
}
private Bundle tryToRegister(Bundle task) {
- Bundle session_id_bundle = new Bundle();
+ Bundle result = new Bundle();
int progress = 0;
- String username = (String) task.get(SessionDialog.USERNAME);
- String password = (String) task.get(SessionDialog.PASSWORD);
+ String username = task.getString(SessionDialog.USERNAME);
+ String password = task.getString(SessionDialog.PASSWORD);
if(validUserLoginData(username, password)) {
- session_id_bundle = register(username, password);
+ result = register(username, password);
broadcastProgress(progress++);
} else {
if(!wellFormedPassword(password)) {
- session_id_bundle.putBoolean(RESULT_KEY, false);
- session_id_bundle.putString(SessionDialog.USERNAME, username);
- session_id_bundle.putBoolean(SessionDialog.PASSWORD_INVALID_LENGTH, true);
+ result.putBoolean(RESULT_KEY, false);
+ result.putString(SessionDialog.USERNAME, username);
+ result.putBoolean(SessionDialog.PASSWORD_INVALID_LENGTH, true);
}
- if(username.isEmpty()) {
- session_id_bundle.putBoolean(RESULT_KEY, false);
- session_id_bundle.putBoolean(SessionDialog.USERNAME_MISSING, true);
+ if(!validUsername(username)) {
+ result.putBoolean(RESULT_KEY, false);
+ result.putBoolean(SessionDialog.USERNAME_MISSING, true);
}
}
- return session_id_bundle;
+ return result;
}
private Bundle register(String username, String password) {