Cosmetic Cleanups for IpSecService

This is a follow-up CL to address comments
on aosp/466677
-Rename ManagedResourceArray.get()
-Comment cleanup

Bug: 38397094
Test: runtest frameworks-net
Change-Id: I6fbdd89c4a864fe1d8a19c68947f582d7b1f0f21
This commit is contained in:
Nathan Harold
2017-10-04 12:58:55 -07:00
parent 727fe3e941
commit 37b4cf3ecb
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();