From 9905e5c393f77d1f87183043a544d4f07006ed7f Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Thu, 28 Jul 2016 13:13:22 +0200 Subject: [PATCH 1/2] Add flag to disable suggestions in password field, no matter if visible or not --- .../android/authentication/AuthenticatorActivity.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/owncloud/android/authentication/AuthenticatorActivity.java b/src/com/owncloud/android/authentication/AuthenticatorActivity.java index 64f46b5b62..7f79a03056 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -886,14 +886,18 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity private void showPassword() { mPasswordInput.setInputType( - InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD + InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD | + InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS ); showViewPasswordButton(); } private void hidePassword() { mPasswordInput.setInputType( - InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD + InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_PASSWORD | + InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS ); showViewPasswordButton(); } From a62cbd0cd8b945977f4da79bb1ddcff0fde8324b Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Fri, 29 Jul 2016 11:08:47 +0200 Subject: [PATCH 2/2] Username trimmed in log-in view --- .../android/authentication/AuthenticatorActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/owncloud/android/authentication/AuthenticatorActivity.java b/src/com/owncloud/android/authentication/AuthenticatorActivity.java index 7f79a03056..22324c9f35 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -632,7 +632,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity outState.putBoolean(KEY_AUTH_IS_FIRST_ATTEMPT_TAG, mIsFirstAuthAttempt); /// AsyncTask (User and password) - outState.putString(KEY_USERNAME, mUsernameInput.getText().toString()); + outState.putString(KEY_USERNAME, mUsernameInput.getText().toString().trim()); outState.putString(KEY_PASSWORD, mPasswordInput.getText().toString()); if (mAsyncTask != null) { @@ -948,7 +948,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity */ private void checkBasicAuthorization() { /// get basic credentials entered by user - String username = mUsernameInput.getText().toString(); + String username = mUsernameInput.getText().toString().trim(); String password = mPasswordInput.getText().toString(); /// be gentle with the user @@ -1057,7 +1057,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity success = createAccount(result); } else { - if (!mUsernameInput.getText().toString().equals(username)) { + if (!mUsernameInput.getText().toString().trim().equals(username)) { // fail - not a new account, but an existing one; disallow result = new RemoteOperationResult(ResultCode.ACCOUNT_NOT_THE_SAME); mAuthToken = "";