Merge "Replace interal okhttp APIs" am: 4fe7ff8d1f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1622669 Change-Id: I9f4e11b6e2ed2c5c09d7ea38e885de7186871edf
This commit is contained in:
@@ -30,10 +30,10 @@ import android.system.OsConstants;
|
|||||||
import android.util.proto.ProtoOutputStream;
|
import android.util.proto.ProtoOutputStream;
|
||||||
|
|
||||||
import com.android.internal.annotations.GuardedBy;
|
import com.android.internal.annotations.GuardedBy;
|
||||||
import com.android.okhttp.internalandroidapi.Dns;
|
|
||||||
import com.android.okhttp.internalandroidapi.HttpURLConnectionFactory;
|
|
||||||
|
|
||||||
import libcore.io.IoUtils;
|
import libcore.io.IoUtils;
|
||||||
|
import libcore.net.http.Dns;
|
||||||
|
import libcore.net.http.HttpURLConnectionFactory;
|
||||||
|
|
||||||
import java.io.FileDescriptor;
|
import java.io.FileDescriptor;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -299,7 +299,7 @@ public class Network implements Parcelable {
|
|||||||
// Set configuration on the HttpURLConnectionFactory that will be good for all
|
// Set configuration on the HttpURLConnectionFactory that will be good for all
|
||||||
// connections created by this Network. Configuration that might vary is left
|
// connections created by this Network. Configuration that might vary is left
|
||||||
// until openConnection() and passed as arguments.
|
// until openConnection() and passed as arguments.
|
||||||
HttpURLConnectionFactory urlConnectionFactory = new HttpURLConnectionFactory();
|
HttpURLConnectionFactory urlConnectionFactory = HttpURLConnectionFactory.createInstance();
|
||||||
urlConnectionFactory.setDns(dnsLookup); // Let traffic go via dnsLookup
|
urlConnectionFactory.setDns(dnsLookup); // Let traffic go via dnsLookup
|
||||||
// A private connection pool just for this Network.
|
// A private connection pool just for this Network.
|
||||||
urlConnectionFactory.setNewConnectionPool(httpMaxConnections,
|
urlConnectionFactory.setNewConnectionPool(httpMaxConnections,
|
||||||
|
|||||||
Reference in New Issue
Block a user