Merge "Replace NetworkPolicyManagerInternal#isUidRestrictedOnMeteredNetworks()" am: 85aad57203
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534910 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I0f8833a502cfa4674190509300eb378c4072efcc
This commit is contained in:
commit
12fbbf4145
1 changed files with 8 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue