diff options
| author | Neil Fuller <nfuller@google.com> | 2019-06-20 14:42:30 -0700 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2019-06-20 14:42:30 -0700 |
| commit | 2350886e099021f394ad4f943836f28124ced47d (patch) | |
| tree | dcd2124ef4a571bd15ab191b7dc9c2693de273dd /core/java | |
| parent | a8b7b88c24faeebb3ccd9f40db1abb07f00e83a1 (diff) | |
| parent | dcf7d6e377959ea44bfb017c0b78b9ef51e5d7cd (diff) | |
Merge "Switch to a single PacketSocketAddress constructor" am: 2d24f7a39e am: a357696c2f am: 9ec43cc7fe
am: dcf7d6e377
Change-Id: I999d61e1086f9a1cfcf9cf38522eb4c2779b607c
Diffstat (limited to 'core/java')
| -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 */); } /** |
