From acfd155c1202ebde4f9d8f19d5308a4da08d108f Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Wed, 16 Sep 2009 18:55:28 -0700 Subject: [PATCH] Don't add backslash if there already is one; fixes #2124974 Change-Id: If5fa8369ee4c52449047d5134f3bf28feb88de1a --- .../email/activity/setup/AccountSetupExchange.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/android/email/activity/setup/AccountSetupExchange.java b/src/com/android/email/activity/setup/AccountSetupExchange.java index fcfbc8ff5..bafca3571 100644 --- a/src/com/android/email/activity/setup/AccountSetupExchange.java +++ b/src/com/android/email/activity/setup/AccountSetupExchange.java @@ -157,8 +157,12 @@ public class AccountSetupExchange extends Activity implements OnClickListener, } if (username != null) { - // Add a backslash to the start of the username as an affordance - mUsernameView.setText("\\" + username); + // Add a backslash to the start of the username, but only if the username has no + // backslash in it. + if (username.indexOf('\\') < 0) { + username = "\\" + username; + } + mUsernameView.setText(username); } if (password != null) {