Merge "Add permission check to setAllowOnlyVpnForUids"

This commit is contained in:
Treehugger Robot
2018-05-25 08:26:34 +00:00
committed by Gerrit 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) {