Merge "Remove 'hasDns' parameter" am: 3176e8be7a
am: c7af83f4ff
Change-Id: I43080dc7922ab6b8b1c61f7a2542dd8cead45bc5
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user