Merge "Remove 'hasDns' parameter" am: 3176e8be7a

am: c7af83f4ff

Change-Id: I43080dc7922ab6b8b1c61f7a2542dd8cead45bc5
This commit is contained in:
Ken Chen
2018-12-18 10:50:11 -08:00
committed by android-build-merger
3 changed files with 3 additions and 4 deletions

View File

@@ -390,7 +390,7 @@ interface INetworkManagementService
/** /**
* Setup a new VPN. * Setup a new VPN.
*/ */
void createVirtualNetwork(int netId, boolean hasDNS, boolean secure); void createVirtualNetwork(int netId, boolean secure);
/** /**
* Remove a network. * 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. // This should never fail. Specifying an already in use NetID will cause failure.
if (networkAgent.isVPN()) { if (networkAgent.isVPN()) {
mNMS.createVirtualNetwork(networkAgent.network.netId, mNMS.createVirtualNetwork(networkAgent.network.netId,
!networkAgent.linkProperties.getDnsServers().isEmpty(),
(networkAgent.networkMisc == null || (networkAgent.networkMisc == null ||
!networkAgent.networkMisc.allowBypass)); !networkAgent.networkMisc.allowBypass));
} else { } else {

View File

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