[DO NOT MERGE] Add permission check to setAllowOnlyVpnForUids
Bug: 63000005 Test: runtest frameworks-net -c com.android.server.connectivity.VpnTest Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedDeviceOwnerTest#testAlwaysOnVpnLockDown Change-Id: Ia1a82ee73d8617f3124032986fe6c09c14bf7752
This commit is contained in:
@@ -1852,6 +1852,8 @@ public class NetworkManagementService extends INetworkManagementService.Stub
|
|||||||
@Override
|
@Override
|
||||||
public void setAllowOnlyVpnForUids(boolean add, UidRange[] uidRanges)
|
public void setAllowOnlyVpnForUids(boolean add, UidRange[] uidRanges)
|
||||||
throws ServiceSpecificException {
|
throws ServiceSpecificException {
|
||||||
|
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mNetdService.networkRejectNonSecureVpn(add, uidRanges);
|
mNetdService.networkRejectNonSecureVpn(add, uidRanges);
|
||||||
} catch (ServiceSpecificException e) {
|
} catch (ServiceSpecificException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user