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 @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) {