Merge "Remove 'hasDns' parameter"

This commit is contained in:
Ken Chen
2018-12-18 11:17:27 +00:00
committed by Gerrit Code Review
3 changed files with 3 additions and 4 deletions

View File

@@ -390,7 +390,7 @@ interface INetworkManagementService
/**
* Setup a new VPN.
*/
void createVirtualNetwork(int netId, boolean hasDNS, boolean secure);
void createVirtualNetwork(int netId, boolean secure);
/**
* Remove a network.

View File

@@ -5714,7 +5714,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
// This should never fail. Specifying an already in use NetID will cause failure.
if (networkAgent.isVPN()) {
mNMS.createVirtualNetwork(networkAgent.network.netId,
!networkAgent.linkProperties.getDnsServers().isEmpty(),
(networkAgent.networkMisc == null ||
!networkAgent.networkMisc.allowBypass));
} else {

View File

@@ -2308,11 +2308,11 @@ public class NetworkManagementService extends INetworkManagementService.Stub
}
@Override
public void createVirtualNetwork(int netId, boolean hasDNS, boolean secure) {
public void createVirtualNetwork(int netId, boolean secure) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
mNetdService.networkCreateVpn(netId, hasDNS, secure);
mNetdService.networkCreateVpn(netId, secure);
} catch (RemoteException | ServiceSpecificException e) {
throw new IllegalStateException(e);
}