From ecffd551cc2a9dc6813effbfc9d21f2b3825a5b5 Mon Sep 17 00:00:00 2001 From: Andy Stadler Date: Thu, 20 Jan 2011 11:30:20 -0800 Subject: [PATCH] DO NOT MERGE Remove all password trim() calls * Initial account setup screen, password entry field * When passing the entered password from incoming->outgoing * When restoring store URI's from HostAuth This will satisfy the users who insist on leading/trailing spaces in their IMAP or EAS password. Not supported by POP3 (no quoting). Bug: 2981433 Change-Id: I16c00bf96382899abb54cb75fcd44cf0f140a660 --- src/com/android/email/activity/setup/AccountSetupBasics.java | 4 ++-- .../android/email/activity/setup/AccountSetupIncoming.java | 2 +- src/com/android/email/provider/EmailContent.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/com/android/email/activity/setup/AccountSetupBasics.java b/src/com/android/email/activity/setup/AccountSetupBasics.java index f72ddfe6a..3db4b083e 100644 --- a/src/com/android/email/activity/setup/AccountSetupBasics.java +++ b/src/com/android/email/activity/setup/AccountSetupBasics.java @@ -350,7 +350,7 @@ public class AccountSetupBasics extends Activity private void finishAutoSetup() { String email = mEmailView.getText().toString().trim(); - String password = mPasswordView.getText().toString().trim(); + String password = mPasswordView.getText().toString(); String[] emailParts = email.split("@"); String user = emailParts[0]; String domain = emailParts[1]; @@ -468,7 +468,7 @@ public class AccountSetupBasics extends Activity */ private void onManualSetup(boolean allowAutoDiscover) { String email = mEmailView.getText().toString().trim(); - String password = mPasswordView.getText().toString().trim(); + String password = mPasswordView.getText().toString(); String[] emailParts = email.split("@"); String user = emailParts[0].trim(); String domain = emailParts[1].trim(); diff --git a/src/com/android/email/activity/setup/AccountSetupIncoming.java b/src/com/android/email/activity/setup/AccountSetupIncoming.java index 518d76084..e82412e6c 100644 --- a/src/com/android/email/activity/setup/AccountSetupIncoming.java +++ b/src/com/android/email/activity/setup/AccountSetupIncoming.java @@ -348,7 +348,7 @@ public class AccountSetupIncoming extends Activity implements OnClickListener { URI uri = new URI( oldUri.getScheme(), mUsernameView.getText().toString().trim() + ":" - + mPasswordView.getText().toString().trim(), + + mPasswordView.getText().toString(), oldUri.getHost(), oldUri.getPort(), null, diff --git a/src/com/android/email/provider/EmailContent.java b/src/com/android/email/provider/EmailContent.java index 3a8b194e6..4ffd2ed7f 100644 --- a/src/com/android/email/provider/EmailContent.java +++ b/src/com/android/email/provider/EmailContent.java @@ -2266,8 +2266,8 @@ public abstract class EmailContent { String userInfo = null; if ((mFlags & FLAG_AUTHENTICATE) != 0) { String trimUser = (mLogin != null) ? mLogin.trim() : ""; - String trimPassword = (mPassword != null) ? mPassword.trim() : ""; - userInfo = trimUser + ":" + trimPassword; + String password = (mPassword != null) ? mPassword : ""; + userInfo = trimUser + ":" + password; } String address = (mAddress != null) ? mAddress.trim() : null; String path = (mDomain != null) ? "/" + mDomain : null;