diff --git a/imap2/src/com/android/imap2/Imap2SyncService.java b/imap2/src/com/android/imap2/Imap2SyncService.java index 2b28d25f4..5cc294de2 100644 --- a/imap2/src/com/android/imap2/Imap2SyncService.java +++ b/imap2/src/com/android/imap2/Imap2SyncService.java @@ -1624,8 +1624,8 @@ public class Imap2SyncService extends AbstractSyncService { if (!mImapResponse.isEmpty()) { String capa = mImapResponse.get(0).toLowerCase(); ArrayList tokens = getTokens(capa); - if (tokens.contains("starttls") && tlsSocket == null) { - // Handle STARTTLS + if (tokens.contains("starttls") && tlsSocket == null && + ((hostAuth.mFlags & HostAuth.FLAG_SSL) == 0)) { userLog("[Use STARTTLS]"); tag = writeCommand(writer, "STARTTLS"); readResponse(reader, tag, "STARTTLS");