Merge "Replace NetworkPolicyManagerInternal#isUidRestrictedOnMeteredNetworks()"
This commit is contained in:
@@ -5714,9 +5714,14 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
// Policy already enforced.
|
||||
return;
|
||||
}
|
||||
if (mPolicyManagerInternal.isUidRestrictedOnMeteredNetworks(uid)) {
|
||||
// If UID is restricted, don't allow them to bring up metered APNs.
|
||||
networkCapabilities.addCapability(NET_CAPABILITY_NOT_METERED);
|
||||
final long ident = Binder.clearCallingIdentity();
|
||||
try {
|
||||
if (mPolicyManager.isUidRestrictedOnMeteredNetworks(uid)) {
|
||||
// If UID is restricted, don't allow them to bring up metered APNs.
|
||||
networkCapabilities.addCapability(NET_CAPABILITY_NOT_METERED);
|
||||
}
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(ident);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user