Merge "Remove Iobridge unused MCAST constants"
diff --git a/luni/src/main/java/libcore/io/IoBridge.java b/luni/src/main/java/libcore/io/IoBridge.java
index 7adae8b..6eab7d0 100644
--- a/luni/src/main/java/libcore/io/IoBridge.java
+++ b/luni/src/main/java/libcore/io/IoBridge.java
@@ -276,10 +276,6 @@
// Socket options used by java.net but not exposed in SocketOptions.
public static final int JAVA_MCAST_JOIN_GROUP = 19;
public static final int JAVA_MCAST_LEAVE_GROUP = 20;
- public static final int JAVA_MCAST_JOIN_SOURCE_GROUP = 21;
- public static final int JAVA_MCAST_LEAVE_SOURCE_GROUP = 22;
- public static final int JAVA_MCAST_BLOCK_SOURCE = 23;
- public static final int JAVA_MCAST_UNBLOCK_SOURCE = 24;
public static final int JAVA_IP_MULTICAST_TTL = 17;
public static final int JAVA_IP_TTL = 25;
@@ -451,39 +447,11 @@
Libcore.os.setsockoptGroupReq(fd, level, op, groupReq);
return;
}
- case IoBridge.JAVA_MCAST_JOIN_SOURCE_GROUP:
- case IoBridge.JAVA_MCAST_LEAVE_SOURCE_GROUP:
- case IoBridge.JAVA_MCAST_BLOCK_SOURCE:
- case IoBridge.JAVA_MCAST_UNBLOCK_SOURCE:
- {
- StructGroupSourceReq groupSourceReq = (StructGroupSourceReq) value;
- int level = (groupSourceReq.gsr_group instanceof Inet4Address)
- ? IPPROTO_IP : IPPROTO_IPV6;
- int op = getGroupSourceReqOp(option);
- Libcore.os.setsockoptGroupSourceReq(fd, level, op, groupSourceReq);
- return;
- }
default:
throw new SocketException("Unknown socket option: " + option);
}
}
- private static int getGroupSourceReqOp(int javaValue) {
- switch (javaValue) {
- case IoBridge.JAVA_MCAST_JOIN_SOURCE_GROUP:
- return MCAST_JOIN_SOURCE_GROUP;
- case IoBridge.JAVA_MCAST_LEAVE_SOURCE_GROUP:
- return MCAST_LEAVE_SOURCE_GROUP;
- case IoBridge.JAVA_MCAST_BLOCK_SOURCE:
- return MCAST_BLOCK_SOURCE;
- case IoBridge.JAVA_MCAST_UNBLOCK_SOURCE:
- return MCAST_UNBLOCK_SOURCE;
- default:
- throw new AssertionError(
- "Unknown java value for setsocketopt op lookup: " + javaValue);
- }
- }
-
/**
* java.io only throws FileNotFoundException when opening files, regardless of what actually
* went wrong. Additionally, java.io is more restrictive than POSIX when it comes to opening