Merge "Use formal API for ActivityThread to set proxy"

This commit is contained in:
Treehugger Robot
2021-02-19 05:42:06 +00:00
committed by Gerrit Code Review
2 changed files with 18 additions and 4 deletions

View File

@@ -4606,7 +4606,7 @@ public class ConnectivityManager {
// Set HTTP proxy system properties to match network.
// TODO: Deprecate this static method and replace it with a non-static version.
try {
Proxy.setHttpProxySystemProperty(getInstance().getDefaultProxy());
Proxy.setHttpProxyConfiguration(getInstance().getDefaultProxy());
} catch (SecurityException e) {
// The process doesn't have ACCESS_NETWORK_STATE, so we can't fetch the proxy.
Log.e(TAG, "Can't set proxy properties", e);