Merge "Cosmetic Cleanups for IpSecService"

am: 87d6fc04b2

Change-Id: If47968dbd55f8f38f9e8dda4d78a0e2e41827da8
This commit is contained in:
nharold
2017-10-05 00:44:37 +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();