From 60c7502b6777be550aaace9e9d780a9f84c8b03f Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Fri, 11 Sep 2009 19:00:18 -0700 Subject: [PATCH] Change exchange setup screen per #2025029 Change-Id: Ib94713857902e336984b847f70c96e04826b9b74 --- res/layout/account_setup_exchange.xml | 2 +- res/values/strings.xml | 6 ++++-- .../email/activity/setup/AccountSetupExchange.java | 12 +++++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/res/layout/account_setup_exchange.xml b/res/layout/account_setup_exchange.xml index 2dd256625..3dd24c5e8 100644 --- a/res/layout/account_setup_exchange.xml +++ b/res/layout/account_setup_exchange.xml @@ -32,7 +32,7 @@ android:layout_weight="1" android:orientation="vertical" > Exchange server settings Exchange Server - + + Domain\\Username + Domain - + Enter domain here Use secure connection (SSL) diff --git a/src/com/android/email/activity/setup/AccountSetupExchange.java b/src/com/android/email/activity/setup/AccountSetupExchange.java index 7d09ab079..3bea6c39a 100644 --- a/src/com/android/email/activity/setup/AccountSetupExchange.java +++ b/src/com/android/email/activity/setup/AccountSetupExchange.java @@ -150,7 +150,8 @@ public class AccountSetupExchange extends Activity implements OnClickListener, } if (username != null) { - mUsernameView.setText(username); + // Add a backslash to the start of the username as an affordance + mUsernameView.setText("\\" + username); } if (password != null) { @@ -236,8 +237,13 @@ public class AccountSetupExchange extends Activity implements OnClickListener, boolean sslRequired = mSslSecurityView.isChecked(); boolean trustCertificates = mTrustCertificatesView.isChecked(); String scheme = (sslRequired) ? (trustCertificates ? "eas+tssl+" : "eas+ssl+") : "eas"; - String userInfo = mUsernameView.getText().toString().trim() + ":" + - mPasswordView.getText().toString().trim(); + String userName = mUsernameView.getText().toString().trim(); + // Remove a leading backslash, if there is one, since we now automatically put one at + // the start of the username field + if (userName.startsWith("\\")) { + userName = userName.substring(1); + } + String userInfo = userName + ":" + mPasswordView.getText().toString().trim(); String host = mServerView.getText().toString().trim(); String path = null;