am 3d26769
: Merge branch \'readonly-p4-donut\' into donut
Merge commit '3d267690a3295e2d1e6df8fb77cb92625f010480' * commit '3d267690a3295e2d1e6df8fb77cb92625f010480': AI 148457: Allow exchange accounts to be set up without an empty domain
This commit is contained in:
commit
00e85ad8ee
@ -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,
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user