Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ae89f2f authored by Neil Fuller's avatar Neil Fuller
Browse files

Switch to a single PacketSocketAddress constructor

Switch to a single PacketSocketAddress constructor to
avoid multiple unnecessary overloads in the
Core Platform API.

Bug: 133196453
Bug: 124232146
Test: build only
Change-Id: I30533ac3aa99c2cd09e8c624fedf6000b0f52c11
parent 30b14a9d
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -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 */);
    }

    /**