Don't add backslash if there already is one; fixes #2124974

Change-Id: If5fa8369ee4c52449047d5134f3bf28feb88de1a
This commit is contained in:
Marc Blank 2009-09-16 18:55:28 -07:00
parent 767ea86398
commit acfd155c12

View File

@ -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) {