Update enforceMeteredApnPolicy to follow the compat flag
On V+, ConnectivityService uses uid blocking state in BpfMap instead of asking NetworkPolicyManager. But, there was one behavior difference because NetworkPolicyManager considers the network is always not blocked for apps without Internet permission. To ensure backward compatibility, the NETWORK_BLOCKED_WITHOUT_INTERNET_PERMISSION flag was introduced in aosp/3076606, aosp/3088285. This CL updates enforceMeteredApnPolicy to respect this flag for backward compatibility. Test: CSEnforceMeteredApnPolicy Bug: 404428733 Bug: 370383309 Flag: EXEMPT bugfix Change-Id: I631f4f840818e1d40f20fccae1ec1a2cbbb6a166
This commit is contained in:
parent
96cc8b4f79
commit
5759bf45a5
1 changed files with 146 additions and 4 deletions
|
|
@ -111,6 +111,8 @@ public final class ConnectivityCompatChanges {
|
|||
* {@link android.net.ConnectivityManager#getActiveNetwork()} always returns null.
|
||||
* {@link android.net.ConnectivityManager.NetworkCallback#onBlockedStatusChanged()} is always
|
||||
* called with blocked=true.
|
||||
* {@link android.net.ConnectivityManager#requestNetwork} can not bring up metered network if
|
||||
* the uid is restricted from using metered networks.
|
||||
* <p>
|
||||
* For backwards compatibility, apps running on older releases, or targeting older SDK levels,
|
||||
* network access from apps without {@link android.Manifest.permission#INTERNET} permission is
|
||||
|
|
|
|||
Loading…
Reference in a new issue