diff --git a/src/com/android/email/activity/setup/AccountSetupExchange.java b/src/com/android/email/activity/setup/AccountSetupExchange.java index 708731cdf..7fa82f3fa 100644 --- a/src/com/android/email/activity/setup/AccountSetupExchange.java +++ b/src/com/android/email/activity/setup/AccountSetupExchange.java @@ -191,8 +191,7 @@ public class AccountSetupExchange extends Activity implements OnClickListener { private void validateFields() { boolean enabled = Utility.requiredFieldValid(mUsernameView) && Utility.requiredFieldValid(mPasswordView) - && Utility.requiredFieldValid(mServerView) - && Utility.requiredFieldValid(mDomainView); + && Utility.requiredFieldValid(mServerView); if (enabled) { try { URI uri = getUri(); @@ -229,7 +228,11 @@ public class AccountSetupExchange extends Activity implements OnClickListener { String userInfo = mUsernameView.getText().toString().trim() + ":" + mPasswordView.getText().toString().trim(); String host = mServerView.getText().toString().trim(); - String path = "/" + mDomainView.getText().toString().trim(); + String domain = mDomainView.getText().toString().trim(); + String path = null; + if (domain.length() > 0) { + path = "/" + domain; + } URI uri = new URI( scheme, diff --git a/tests/src/com/android/email/activity/setup/AccountSetupExchangeTests.java b/tests/src/com/android/email/activity/setup/AccountSetupExchangeTests.java index e27909a94..419259963 100644 --- a/tests/src/com/android/email/activity/setup/AccountSetupExchangeTests.java +++ b/tests/src/com/android/email/activity/setup/AccountSetupExchangeTests.java @@ -115,13 +115,13 @@ public class AccountSetupExchangeTests extends } /** - * No EAS domain is not OK - not enabled + * No EAS domain is OK - enabled */ public void testBadUriNoDomain() { Intent i = getTestIntent("eas://user:password@server.com"); setActivityIntent(i); getActivityAndFields(); - assertFalse(mNextButton.isEnabled()); + assertTrue(mNextButton.isEnabled()); } /** @@ -147,7 +147,7 @@ public class AccountSetupExchangeTests extends assertTrue(mNextButton.isEnabled()); mDomainView.setText(" "); - assertFalse(mNextButton.isEnabled()); + assertTrue(mNextButton.isEnabled()); mDomainView.setText("do main"); assertFalse(mNextButton.isEnabled());