Reverse order of conditions in if clause
This commit is contained in:
parent
732463a89f
commit
c0924c2031
1 changed files with 2 additions and 2 deletions
|
@ -182,8 +182,8 @@ public class DefaultTrustedSocketFactory implements TrustedSocketFactory {
|
|||
}
|
||||
|
||||
public static void setSniHost(SSLSocketFactory factory, SSLSocket socket, String hostname) {
|
||||
if (factory instanceof android.net.SSLCertificateSocketFactory &&
|
||||
android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1 &&
|
||||
factory instanceof android.net.SSLCertificateSocketFactory) {
|
||||
SSLCertificateSocketFactory sslCertificateSocketFactory = (SSLCertificateSocketFactory) factory;
|
||||
sslCertificateSocketFactory.setHostname(socket, hostname);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue