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

Commit b60570c7 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Make registerDefaultNetwork work on metered networks.

Bug: 29927488
Change-Id: I3b705c2ab0d1493546ffa5185bb5b07d5e25c897
parent 2573d83f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3952,8 +3952,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
        } else {
            networkCapabilities = new NetworkCapabilities(networkCapabilities);
            enforceNetworkRequestPermissions(networkCapabilities);
        }
            // TODO: this is incorrect. We mark the request as metered or not depending on the state
            // of the app when the request is filed, but we never change the request if the app
            // changes network state. http://b/29964605
            enforceMeteredApnPolicy(networkCapabilities);
        }
        ensureRequestableCapabilities(networkCapabilities);

        if (timeoutMs < 0 || timeoutMs > ConnectivityManager.MAX_NETWORK_REQUEST_TIMEOUT_MS) {