diff options
author | 2019-06-20 14:09:15 +0000 | |
---|---|---|
committer | 2019-06-20 14:09:15 +0000 | |
commit | 2d24f7a39e6e6335adee7cc5bd0f363533beef79 (patch) | |
tree | c323b2af6ae2b1307dd09be845785527ecb95d37 | |
parent | 09f6675744839dfd59b218832cdb4dc3fe435d75 (diff) | |
parent | 6ae89f2f9c908696369440b1bf0f7e42cb5b9e0b (diff) |
Merge "Switch to a single PacketSocketAddress constructor"
-rw-r--r-- | core/java/android/net/util/SocketUtils.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/net/util/SocketUtils.java b/core/java/android/net/util/SocketUtils.java index 1364d8c17e1b..d9bcb3ce0d8f 100644 --- a/core/java/android/net/util/SocketUtils.java +++ b/core/java/android/net/util/SocketUtils.java @@ -69,7 +69,10 @@ public final class SocketUtils { */ @NonNull public static SocketAddress makePacketSocketAddress(int protocol, int ifIndex) { - return new PacketSocketAddress((short) protocol, ifIndex); + return new PacketSocketAddress( + (short) protocol /* sll_protocol */, + ifIndex /* sll_ifindex */, + null /* sll_addr */); } /** @@ -77,7 +80,10 @@ public final class SocketUtils { */ @NonNull public static SocketAddress makePacketSocketAddress(int ifIndex, @NonNull byte[] hwAddr) { - return new PacketSocketAddress(ifIndex, hwAddr); + return new PacketSocketAddress( + (short) 0 /* sll_protocol */, + ifIndex /* sll_ifindex */, + hwAddr /* sll_addr */); } /** |