Merge "Add permission check to setAllowOnlyVpnForUids" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-03-08 15:38:18 +00:00
committed by Android (Google) Code Review

View File

@@ -1789,6 +1789,8 @@ public class NetworkManagementService extends INetworkManagementService.Stub
@Override
public void setAllowOnlyVpnForUids(boolean add, UidRange[] uidRanges)
throws ServiceSpecificException {
mContext.enforceCallingOrSelfPermission(NETWORK_STACK, TAG);
try {
mNetdService.networkRejectNonSecureVpn(add, uidRanges);
} catch (ServiceSpecificException e) {