Merge "Add permission check to setAllowOnlyVpnForUids" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
269357aa0e
@@ -1789,6 +1789,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(NETWORK_STACK, TAG);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mNetdService.networkRejectNonSecureVpn(add, uidRanges);
|
mNetdService.networkRejectNonSecureVpn(add, uidRanges);
|
||||||
} catch (ServiceSpecificException e) {
|
} catch (ServiceSpecificException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user