diff options
author | Victor Chang <vichang@google.com> | 2021-06-29 17:11:39 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-06-29 17:11:39 +0000 |
commit | f691f9a5d80d46fd137b8ad8953b6c60c54944e3 (patch) | |
tree | d8a94538711392cbdd9caca9b23f1dcf94cab22c | |
parent | fb2ba4368124f84243acc225b879b82652179a87 (diff) | |
parent | 381a66cc396e4402ff2cb3415a6ef116e1413c3f (diff) | |
download | okhttp-f691f9a5d80d46fd137b8ad8953b6c60c54944e3.tar.gz |
Remove unused @CorePlatformApi and mark APIs in okhttp as @SystemApi am: 381a66cc39
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/okhttp/+/15080381
Change-Id: Iaaabc524db49938862382c3e2f7d8dd67f3c5598
8 files changed, 118 insertions, 66 deletions
diff --git a/android/src/main/java/com/android/okhttp/internalandroidapi/AndroidResponseCacheAdapter.java b/android/src/main/java/com/android/okhttp/internalandroidapi/AndroidResponseCacheAdapter.java index bf7e9a9..0a25b88 100644 --- a/android/src/main/java/com/android/okhttp/internalandroidapi/AndroidResponseCacheAdapter.java +++ b/android/src/main/java/com/android/okhttp/internalandroidapi/AndroidResponseCacheAdapter.java @@ -16,7 +16,15 @@ package com.android.okhttp.internalandroidapi; +import static android.annotation.SystemApi.Client.MODULE_LIBRARIES; + +import android.annotation.SystemApi; + import com.android.okhttp.internalandroidapi.HasCacheHolder.CacheHolder; + +import libcore.util.NonNull; +import libcore.util.Nullable; + import com.squareup.okhttp.Cache; import com.squareup.okhttp.Request; import com.squareup.okhttp.Response; @@ -38,7 +46,8 @@ import java.util.Map; * classes appearing on method signatures. * @hide */ -@libcore.api.CorePlatformApi +@SystemApi(client = MODULE_LIBRARIES) +@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public final class AndroidResponseCacheAdapter { private final CacheHolder cacheHolder; @@ -49,8 +58,9 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi - public AndroidResponseCacheAdapter(CacheHolder cacheHolder) { + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + public AndroidResponseCacheAdapter(@NonNull CacheHolder cacheHolder) { this.cacheHolder = cacheHolder; // Avoid one level of dereferencing by storing the reference to the OkHttp cache for later. this.okHttpCache = cacheHolder.getCache(); @@ -62,8 +72,9 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi - public CacheHolder getCacheHolder() { + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + public @NonNull CacheHolder getCacheHolder() { return cacheHolder; } @@ -73,9 +84,10 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi - public CacheResponse get(URI uri, String requestMethod, - Map<String, List<String>> requestHeaders) throws IOException { + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + public @Nullable CacheResponse get(@NonNull URI uri, @NonNull String requestMethod, + @Nullable Map<String, List<String>> requestHeaders) throws IOException { Request okRequest = JavaApiConverter.createOkRequest(uri, requestMethod, requestHeaders); Response okResponse = okHttpCache.internalCache.get(okRequest); if (okResponse == null) { @@ -90,8 +102,10 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi - public CacheRequest put(URI uri, URLConnection urlConnection) throws IOException { + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + public @Nullable CacheRequest put(@NonNull URI uri, @NonNull URLConnection urlConnection) + throws IOException { Response okResponse = JavaApiConverter.createOkResponseForCachePut(uri, urlConnection); if (okResponse == null) { // The URLConnection is not cacheable or could not be converted. Stop. @@ -112,7 +126,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public long getSize() throws IOException { return okHttpCache.getSize(); } @@ -123,7 +138,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public long getMaxSize() { return okHttpCache.getMaxSize(); } @@ -135,7 +151,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public void flush() throws IOException { okHttpCache.flush(); } @@ -146,7 +163,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public int getNetworkCount() { return okHttpCache.getNetworkCount(); } @@ -158,7 +176,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public int getHitCount() { return okHttpCache.getHitCount(); } @@ -170,7 +189,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public int getRequestCount() { return okHttpCache.getRequestCount(); } @@ -180,7 +200,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public void close() throws IOException { okHttpCache.close(); } @@ -192,7 +213,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public void delete() throws IOException { okHttpCache.delete(); } diff --git a/android/src/main/java/com/android/okhttp/internalandroidapi/Dns.java b/android/src/main/java/com/android/okhttp/internalandroidapi/Dns.java index 20f84da..41c623f 100644 --- a/android/src/main/java/com/android/okhttp/internalandroidapi/Dns.java +++ b/android/src/main/java/com/android/okhttp/internalandroidapi/Dns.java @@ -24,7 +24,6 @@ import java.util.List; * A domain name service that resolves IP addresses for host names. * @hide */ -@libcore.api.CorePlatformApi public interface Dns { /** * Returns the IP addresses of {@code hostname}, in the order they should @@ -32,6 +31,5 @@ public interface Dns { * * @hide */ - @libcore.api.CorePlatformApi List<InetAddress> lookup(String hostname) throws UnknownHostException; } diff --git a/android/src/main/java/com/android/okhttp/internalandroidapi/HasCacheHolder.java b/android/src/main/java/com/android/okhttp/internalandroidapi/HasCacheHolder.java index 895b576..6341b5f 100644 --- a/android/src/main/java/com/android/okhttp/internalandroidapi/HasCacheHolder.java +++ b/android/src/main/java/com/android/okhttp/internalandroidapi/HasCacheHolder.java @@ -16,6 +16,12 @@ package com.android.okhttp.internalandroidapi; +import static android.annotation.SystemApi.Client.MODULE_LIBRARIES; + +import android.annotation.SystemApi; + +import libcore.util.NonNull; + import com.squareup.okhttp.Cache; import java.io.File; @@ -24,7 +30,8 @@ import java.io.File; * An interface used to indicate a class can return a {@link CacheHolder} object. * @hide */ -@libcore.api.CorePlatformApi +@SystemApi(client = MODULE_LIBRARIES) +@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public interface HasCacheHolder { /** @@ -32,15 +39,17 @@ public interface HasCacheHolder { * * @hide */ - @libcore.api.CorePlatformApi - CacheHolder getCacheHolder(); + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + @NonNull CacheHolder getCacheHolder(); /** * A holder for an OkHttp internal Cache object. This class exists as an opaque layer over * OkHttp internal classes. * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) final class CacheHolder { private final Cache okHttpCache; @@ -73,8 +82,9 @@ public interface HasCacheHolder { * * @hide */ - @libcore.api.CorePlatformApi - public static CacheHolder create(File directory, long maxSizeBytes) { + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + public static @NonNull CacheHolder create(@NonNull File directory, long maxSizeBytes) { Cache cache = new Cache(directory, maxSizeBytes); return new CacheHolder(cache); } @@ -85,8 +95,9 @@ public interface HasCacheHolder { * * @hide */ - @libcore.api.CorePlatformApi - public boolean isEquivalent(File directory, long maxSizeBytes) { + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + public boolean isEquivalent(@NonNull File directory, long maxSizeBytes) { return (okHttpCache.getDirectory().equals(directory) && okHttpCache.getMaxSize() == maxSizeBytes && !okHttpCache.isClosed()); diff --git a/android/src/main/java/com/android/okhttp/internalandroidapi/HttpURLConnectionFactory.java b/android/src/main/java/com/android/okhttp/internalandroidapi/HttpURLConnectionFactory.java index d6a7402..eb223c4 100644 --- a/android/src/main/java/com/android/okhttp/internalandroidapi/HttpURLConnectionFactory.java +++ b/android/src/main/java/com/android/okhttp/internalandroidapi/HttpURLConnectionFactory.java @@ -51,14 +51,12 @@ import javax.net.SocketFactory; * * @hide */ -@libcore.api.CorePlatformApi public final class HttpURLConnectionFactory { private ConnectionPool connectionPool; private com.squareup.okhttp.Dns dns; /** @hide */ - @libcore.api.CorePlatformApi public HttpURLConnectionFactory() { } @@ -68,14 +66,12 @@ public final class HttpURLConnectionFactory { * * @hide */ - @libcore.api.CorePlatformApi public void setNewConnectionPool(int maxIdleConnections, long keepAliveDuration, TimeUnit timeUnit) { this.connectionPool = new ConnectionPool(maxIdleConnections, keepAliveDuration, timeUnit); } /** @hide */ - @libcore.api.CorePlatformApi public void setDns(Dns dns) { Objects.requireNonNull(dns); this.dns = new DnsAdapter(dns); @@ -118,7 +114,6 @@ public final class HttpURLConnectionFactory { * * @hide */ - @libcore.api.CorePlatformApi public URLConnection openConnection(URL url, SocketFactory socketFactory, Proxy proxy) throws IOException { Objects.requireNonNull(socketFactory); diff --git a/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/AndroidResponseCacheAdapter.java b/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/AndroidResponseCacheAdapter.java index 20f8359..1c5c6e6 100644 --- a/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/AndroidResponseCacheAdapter.java +++ b/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/AndroidResponseCacheAdapter.java @@ -17,7 +17,15 @@ package com.android.okhttp.internalandroidapi; +import static android.annotation.SystemApi.Client.MODULE_LIBRARIES; + +import android.annotation.SystemApi; + import com.android.okhttp.internalandroidapi.HasCacheHolder.CacheHolder; + +import libcore.util.NonNull; +import libcore.util.Nullable; + import com.android.okhttp.Cache; import com.android.okhttp.Request; import com.android.okhttp.Response; @@ -40,7 +48,8 @@ import java.util.Map; * @hide * @hide This class is not part of the Android public SDK API */ -@libcore.api.CorePlatformApi +@SystemApi(client = MODULE_LIBRARIES) +@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public final class AndroidResponseCacheAdapter { private final CacheHolder cacheHolder; @@ -51,8 +60,9 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi - public AndroidResponseCacheAdapter(CacheHolder cacheHolder) { + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + public AndroidResponseCacheAdapter(@NonNull CacheHolder cacheHolder) { this.cacheHolder = cacheHolder; // Avoid one level of dereferencing by storing the reference to the OkHttp cache for later. this.okHttpCache = cacheHolder.getCache(); @@ -64,8 +74,9 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi - public CacheHolder getCacheHolder() { + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + public @NonNull CacheHolder getCacheHolder() { return cacheHolder; } @@ -75,9 +86,10 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi - public CacheResponse get(URI uri, String requestMethod, - Map<String, List<String>> requestHeaders) throws IOException { + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + public @Nullable CacheResponse get(@NonNull URI uri, @NonNull String requestMethod, + @Nullable Map<String, List<String>> requestHeaders) throws IOException { Request okRequest = JavaApiConverter.createOkRequest(uri, requestMethod, requestHeaders); Response okResponse = okHttpCache.internalCache.get(okRequest); if (okResponse == null) { @@ -92,8 +104,10 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi - public CacheRequest put(URI uri, URLConnection urlConnection) throws IOException { + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + public @Nullable CacheRequest put(@NonNull URI uri, @NonNull URLConnection urlConnection) + throws IOException { Response okResponse = JavaApiConverter.createOkResponseForCachePut(uri, urlConnection); if (okResponse == null) { // The URLConnection is not cacheable or could not be converted. Stop. @@ -114,7 +128,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public long getSize() throws IOException { return okHttpCache.getSize(); } @@ -125,7 +140,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public long getMaxSize() { return okHttpCache.getMaxSize(); } @@ -137,7 +153,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public void flush() throws IOException { okHttpCache.flush(); } @@ -148,7 +165,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public int getNetworkCount() { return okHttpCache.getNetworkCount(); } @@ -160,7 +178,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public int getHitCount() { return okHttpCache.getHitCount(); } @@ -172,7 +191,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public int getRequestCount() { return okHttpCache.getRequestCount(); } @@ -182,7 +202,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public void close() throws IOException { okHttpCache.close(); } @@ -194,7 +215,8 @@ public final class AndroidResponseCacheAdapter { * * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public void delete() throws IOException { okHttpCache.delete(); } diff --git a/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/Dns.java b/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/Dns.java index 104f23f..4da9d8f 100644 --- a/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/Dns.java +++ b/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/Dns.java @@ -26,7 +26,6 @@ import java.util.List; * @hide * @hide This class is not part of the Android public SDK API */ -@libcore.api.CorePlatformApi public interface Dns { /** * Returns the IP addresses of {@code hostname}, in the order they should @@ -34,6 +33,5 @@ public interface Dns { * * @hide */ - @libcore.api.CorePlatformApi List<InetAddress> lookup(String hostname) throws UnknownHostException; } diff --git a/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/HasCacheHolder.java b/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/HasCacheHolder.java index 757c006..67ae1ca 100644 --- a/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/HasCacheHolder.java +++ b/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/HasCacheHolder.java @@ -17,6 +17,12 @@ package com.android.okhttp.internalandroidapi; +import static android.annotation.SystemApi.Client.MODULE_LIBRARIES; + +import android.annotation.SystemApi; + +import libcore.util.NonNull; + import com.android.okhttp.Cache; import java.io.File; @@ -26,7 +32,8 @@ import java.io.File; * @hide * @hide This class is not part of the Android public SDK API */ -@libcore.api.CorePlatformApi +@SystemApi(client = MODULE_LIBRARIES) +@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) public interface HasCacheHolder { /** @@ -34,15 +41,17 @@ public interface HasCacheHolder { * * @hide */ - @libcore.api.CorePlatformApi - CacheHolder getCacheHolder(); + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + @NonNull CacheHolder getCacheHolder(); /** * A holder for an OkHttp internal Cache object. This class exists as an opaque layer over * OkHttp internal classes. * @hide */ - @libcore.api.CorePlatformApi + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) final class CacheHolder { private final Cache okHttpCache; @@ -75,8 +84,9 @@ public interface HasCacheHolder { * * @hide */ - @libcore.api.CorePlatformApi - public static CacheHolder create(File directory, long maxSizeBytes) { + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + public static @NonNull CacheHolder create(@NonNull File directory, long maxSizeBytes) { Cache cache = new Cache(directory, maxSizeBytes); return new CacheHolder(cache); } @@ -87,8 +97,9 @@ public interface HasCacheHolder { * * @hide */ - @libcore.api.CorePlatformApi - public boolean isEquivalent(File directory, long maxSizeBytes) { + @SystemApi(client = MODULE_LIBRARIES) + @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE) + public boolean isEquivalent(@NonNull File directory, long maxSizeBytes) { return (okHttpCache.getDirectory().equals(directory) && okHttpCache.getMaxSize() == maxSizeBytes && !okHttpCache.isClosed()); diff --git a/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/HttpURLConnectionFactory.java b/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/HttpURLConnectionFactory.java index 91266ab..f4403b8 100644 --- a/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/HttpURLConnectionFactory.java +++ b/repackaged/android/src/main/java/com/android/okhttp/internalandroidapi/HttpURLConnectionFactory.java @@ -53,14 +53,12 @@ import javax.net.SocketFactory; * @hide * @hide This class is not part of the Android public SDK API */ -@libcore.api.CorePlatformApi public final class HttpURLConnectionFactory { private ConnectionPool connectionPool; private com.android.okhttp.Dns dns; /** @hide */ - @libcore.api.CorePlatformApi public HttpURLConnectionFactory() { } @@ -70,14 +68,12 @@ public final class HttpURLConnectionFactory { * * @hide */ - @libcore.api.CorePlatformApi public void setNewConnectionPool(int maxIdleConnections, long keepAliveDuration, TimeUnit timeUnit) { this.connectionPool = new ConnectionPool(maxIdleConnections, keepAliveDuration, timeUnit); } /** @hide */ - @libcore.api.CorePlatformApi public void setDns(Dns dns) { Objects.requireNonNull(dns); this.dns = new DnsAdapter(dns); @@ -120,7 +116,6 @@ public final class HttpURLConnectionFactory { * * @hide */ - @libcore.api.CorePlatformApi public URLConnection openConnection(URL url, SocketFactory socketFactory, Proxy proxy) throws IOException { Objects.requireNonNull(socketFactory); |