Merge "Cosmetic Cleanups for IpSecService" am: 87d6fc04b2 am: ffb9ae2323

am: cc51ef0a47

Change-Id: I0a9c52ca26ad1b7e4505f7c9dc32ad9550b62afc
This commit is contained in:
nharold
2017-10-05 01:07:53 +00:00
committed by android-build-merger
3 changed files with 10 additions and 10 deletions

View File

@@ -34,7 +34,7 @@ public final class IpSecConfig implements Parcelable {
// Preventing this from being null simplifies Java->Native binder
private String mRemoteAddress = "";
// The underlying network interface that represents the "gateway" Network
// The underlying Network that represents the "gateway" Network
// for outbound packets. It may also be used to select packets.
private Network mNetwork;
@@ -273,6 +273,7 @@ public final class IpSecConfig implements Parcelable {
};
@VisibleForTesting
/** Equals method used for testing */
public static boolean equals(IpSecConfig lhs, IpSecConfig rhs) {
if (lhs == null || rhs == null) return (lhs == rhs);
return (lhs.mMode == rhs.mMode

View File

@@ -409,8 +409,6 @@ public final class IpSecTransform implements AutoCloseable {
public IpSecTransform buildTransportModeTransform(InetAddress remoteAddress)
throws IpSecManager.ResourceUnavailableException,
IpSecManager.SpiUnavailableException, IOException {
//FIXME: argument validation here
//throw new IllegalArgumentException("Natt Keepalive requires UDP Encapsulation");
mConfig.setMode(MODE_TRANSPORT);
mConfig.setRemoteAddress(remoteAddress.getHostAddress());
return new IpSecTransform(mContext, mConfig).activate();