Revert "Track updates to Conscrypt". DO NOT MERGE ANYWHERE.

Tracking the revert of the corresponding Conscrypt CL.

This reverts commit 51c55971d99889ccbcf6cc6b896cabeb1850e722.

This is a clean revert. The upload hook to fix lint errors was not run
(this CL was uploaded with --no-verify).

Test: Treehugger
Test: make droid cts
Bug: 62424503

Change-Id: I72ae3e1b1264fc0c3d04cf188867eea603f5b691
diff --git a/android/src/android/net/http/CertificateChainValidator.java b/android/src/android/net/http/CertificateChainValidator.java
index f338da6..96bf169 100644
--- a/android/src/android/net/http/CertificateChainValidator.java
+++ b/android/src/android/net/http/CertificateChainValidator.java
@@ -16,7 +16,7 @@
 
 package android.net.http;
 
-import com.android.org.conscrypt.Conscrypt;
+import com.android.org.conscrypt.SSLParametersImpl;
 import com.android.org.conscrypt.TrustManagerImpl;
 
 import android.util.Log;
@@ -227,7 +227,7 @@
         }
 
         try {
-            X509TrustManager x509TrustManager = Conscrypt.getDefaultX509TrustManager();
+            X509TrustManager x509TrustManager = SSLParametersImpl.getDefaultX509TrustManager();
             // Use duck-typing to try and call the hostname aware checkServerTrusted if
             // available.
             try {
diff --git a/android/src/android/net/http/HttpsConnection.java b/android/src/android/net/http/HttpsConnection.java
index 13387b8..213537b 100644
--- a/android/src/android/net/http/HttpsConnection.java
+++ b/android/src/android/net/http/HttpsConnection.java
@@ -18,7 +18,6 @@
 
 import android.content.Context;
 import android.util.Log;
-import com.android.org.conscrypt.Conscrypt;
 import com.android.org.conscrypt.FileClientSessionCache;
 import com.android.org.conscrypt.OpenSSLContextImpl;
 import com.android.org.conscrypt.SSLClientSessionCache;
@@ -76,7 +75,7 @@
                 cache = FileClientSessionCache.usingDirectory(sessionDir);
             }
 
-            OpenSSLContextImpl sslContext =  (OpenSSLContextImpl) Conscrypt.newPreferredSSLContextSpi();
+            OpenSSLContextImpl sslContext = OpenSSLContextImpl.getPreferred();
 
             // here, trust managers is a single trust-all manager
             TrustManager[] trustManagers = new TrustManager[] {