Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac6724b6 authored by Lorenzo Colitti's avatar Lorenzo Colitti Committed by Android (Google) Code Review
Browse files

Merge "Don't require ACCESS_NETWORK_STATE in setProcessDefaultNetwork"

parents 1dc1c9a7 ec4c5555
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2567,7 +2567,12 @@ public class ConnectivityManager {
        if (NetworkUtils.bindProcessToNetwork(netId)) {
            // 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());
            } 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);
            }
            // Must flush DNS cache as new network may have different DNS resolutions.
            InetAddress.clearDnsCache();
            // Must flush socket pool as idle sockets will be bound to previous network and may