From e2cf1c58ed3e123835056c1d4f2cda49785d04d7 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Sat, 18 Aug 2012 13:31:00 -0700 Subject: [PATCH] Use proper values for SSL flags; remove obsolete code Bug: 7013259 Change-Id: I8be865806844d4f7bad6bfe65d08735051de6db8 --- .../com/android/imap2/smtp/MailTransport.java | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/imap2/src/com/android/imap2/smtp/MailTransport.java b/imap2/src/com/android/imap2/smtp/MailTransport.java index f5c2217a6..7f6cedce5 100644 --- a/imap2/src/com/android/imap2/smtp/MailTransport.java +++ b/imap2/src/com/android/imap2/smtp/MailTransport.java @@ -59,18 +59,6 @@ public class MailTransport implements Transport { private final HostAuth mHostAuth; private final Context mContext; - private String[] mUserInfoParts; - - /** - * One of the {@code Transport.CONNECTION_SECURITY_*} values. - */ - private int mConnectionSecurity; - - /** - * Whether or not to trust all server certificates (i.e. skip host verification) in SSL - * handshakes - */ - private boolean mTrustCertificates; private Socket mSocket; private InputStream mIn; @@ -106,17 +94,17 @@ public class MailTransport implements Transport { @Override public boolean canTrySslSecurity() { - return mConnectionSecurity == Transport.CONNECTION_SECURITY_SSL; + return (mHostAuth.mFlags & HostAuth.FLAG_SSL) != 0; } @Override public boolean canTryTlsSecurity() { - return mConnectionSecurity == Transport.CONNECTION_SECURITY_TLS; + return (mHostAuth.mFlags & HostAuth.FLAG_TLS) != 0; } @Override public boolean canTrustAllCertificates() { - return mTrustCertificates; + return (mHostAuth.mFlags & HostAuth.FLAG_TRUST_ALL) != 0; } /**