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

Commit d10ea3dc authored by Lorenzo Colitti's avatar Lorenzo Colitti Committed by android-build-merger
Browse files

Make registerDefaultNetwork work on metered networks.

am: b60570c7

Change-Id: I2d5edc273df22e5c787f227820c1ce956adfe42c
parents bc2ba565 b60570c7
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) {