am aee74ef4: am f495b95d: am 67b60f66: am b57bca27: Default to encrypted connections (YAY!)

* commit 'aee74ef40d1521f5301d803e9c275285d9d719ee':
  Default to encrypted connections (YAY!)
This commit is contained in:
Tony Mantler 2014-11-02 18:53:48 +00:00 committed by Android Git Automerger
commit 12a5933af3

View File

@ -960,22 +960,22 @@ public class AccountSetupFinal extends AccountSetupActivity
final String domain = emailParts[1];
final Account account = mSetupData.getAccount();
final EmailServiceUtils.EmailServiceInfo info =
mSetupData.getIncomingServiceInfo(this);
final HostAuth recvAuth = account.getOrCreateHostAuthRecv(this);
recvAuth.setUserName(email);
recvAuth.setConnection(mSetupData.getIncomingProtocol(), domain,
HostAuth.PORT_UNKNOWN, HostAuth.FLAG_NONE);
HostAuth.PORT_UNKNOWN, info.offerTls ? HostAuth.FLAG_TLS : HostAuth.FLAG_SSL);
AccountSetupCredentialsFragment.populateHostAuthWithResults(this, recvAuth,
mSetupData.getCredentialResults());
mSetupData.setIncomingCredLoaded(true);
final EmailServiceUtils.EmailServiceInfo info =
mSetupData.getIncomingServiceInfo(this);
if (info.usesSmtp) {
final HostAuth sendAuth = account.getOrCreateHostAuthSend(this);
sendAuth.setUserName(email);
sendAuth.setConnection(HostAuth.LEGACY_SCHEME_SMTP, domain,
HostAuth.PORT_UNKNOWN, HostAuth.FLAG_NONE);
HostAuth.PORT_UNKNOWN, HostAuth.FLAG_TLS);
AccountSetupCredentialsFragment.populateHostAuthWithResults(this, sendAuth,
mSetupData.getCredentialResults());
mSetupData.setOutgoingCredLoaded(true);