Loading Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ java_library { installable: true, srcs: [ "src/**/*.java", ":framework-networkstack-shared-srcs", ":services-networkstack-shared-srcs", ], static_libs: [ Loading src/android/net/dhcp/DhcpLeaseRepository.java +3 −3 Original line number Diff line number Diff line Loading @@ -16,11 +16,11 @@ package android.net.dhcp; import static android.net.NetworkUtils.inet4AddressToIntHTH; import static android.net.NetworkUtils.intToInet4AddressHTH; import static android.net.NetworkUtils.prefixLengthToV4NetmaskIntHTH; import static android.net.dhcp.DhcpLease.EXPIRATION_NEVER; import static android.net.dhcp.DhcpLease.inet4AddrToString; import static android.net.shared.Inet4AddressUtils.inet4AddressToIntHTH; import static android.net.shared.Inet4AddressUtils.intToInet4AddressHTH; import static android.net.shared.Inet4AddressUtils.prefixLengthToV4NetmaskIntHTH; import static com.android.server.util.NetworkStackConstants.IPV4_ADDR_BITS; Loading src/android/net/dhcp/DhcpPacket.java +3 −3 Original line number Diff line number Diff line Loading @@ -3,8 +3,8 @@ package android.net.dhcp; import android.annotation.Nullable; import android.net.DhcpResults; import android.net.LinkAddress; import android.net.NetworkUtils; import android.net.metrics.DhcpErrorEvent; import android.net.shared.Inet4AddressUtils; import android.os.Build; import android.os.SystemProperties; import android.system.OsConstants; Loading Loading @@ -1222,13 +1222,13 @@ public abstract class DhcpPacket { int prefixLength; if (mSubnetMask != null) { try { prefixLength = NetworkUtils.netmaskToPrefixLength(mSubnetMask); prefixLength = Inet4AddressUtils.netmaskToPrefixLength(mSubnetMask); } catch (IllegalArgumentException e) { // Non-contiguous netmask. return null; } } else { prefixLength = NetworkUtils.getImplicitNetmask(ipAddress); prefixLength = Inet4AddressUtils.getImplicitNetmask(ipAddress); } DhcpResults results = new DhcpResults(); Loading src/android/net/dhcp/DhcpServer.java +2 −2 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.net.dhcp; import static android.net.NetworkUtils.getBroadcastAddress; import static android.net.NetworkUtils.getPrefixMaskAsInet4Address; import static android.net.TrafficStats.TAG_SYSTEM_DHCP_SERVER; import static android.net.dhcp.DhcpPacket.DHCP_CLIENT; import static android.net.dhcp.DhcpPacket.DHCP_HOST_NAME; Loading @@ -25,6 +23,8 @@ import static android.net.dhcp.DhcpPacket.DHCP_SERVER; import static android.net.dhcp.DhcpPacket.ENCAP_BOOTP; import static android.net.dhcp.IDhcpServer.STATUS_INVALID_ARGUMENT; import static android.net.dhcp.IDhcpServer.STATUS_SUCCESS; import static android.net.shared.Inet4AddressUtils.getBroadcastAddress; import static android.net.shared.Inet4AddressUtils.getPrefixMaskAsInet4Address; import static android.system.OsConstants.AF_INET; import static android.system.OsConstants.IPPROTO_UDP; import static android.system.OsConstants.SOCK_DGRAM; Loading src/android/net/dhcp/DhcpServingParams.java +5 −4 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ package android.net.dhcp; import static android.net.NetworkUtils.getPrefixMaskAsInet4Address; import static android.net.NetworkUtils.intToInet4AddressHTH; import static android.net.shared.Inet4AddressUtils.getPrefixMaskAsInet4Address; import static android.net.shared.Inet4AddressUtils.intToInet4AddressHTH; import static com.android.server.util.NetworkStackConstants.INFINITE_LEASE; import static com.android.server.util.NetworkStackConstants.IPV4_MAX_MTU; Loading @@ -29,7 +29,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.net.IpPrefix; import android.net.LinkAddress; import android.net.NetworkUtils; import android.net.shared.Inet4AddressUtils; import android.util.ArraySet; import java.net.Inet4Address; Loading Loading @@ -164,7 +164,8 @@ public class DhcpServingParams { */ @NonNull public Inet4Address getBroadcastAddress() { return NetworkUtils.getBroadcastAddress(getServerInet4Addr(), serverAddr.getPrefixLength()); return Inet4AddressUtils.getBroadcastAddress( getServerInet4Addr(), serverAddr.getPrefixLength()); } /** Loading Loading
Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ java_library { installable: true, srcs: [ "src/**/*.java", ":framework-networkstack-shared-srcs", ":services-networkstack-shared-srcs", ], static_libs: [ Loading
src/android/net/dhcp/DhcpLeaseRepository.java +3 −3 Original line number Diff line number Diff line Loading @@ -16,11 +16,11 @@ package android.net.dhcp; import static android.net.NetworkUtils.inet4AddressToIntHTH; import static android.net.NetworkUtils.intToInet4AddressHTH; import static android.net.NetworkUtils.prefixLengthToV4NetmaskIntHTH; import static android.net.dhcp.DhcpLease.EXPIRATION_NEVER; import static android.net.dhcp.DhcpLease.inet4AddrToString; import static android.net.shared.Inet4AddressUtils.inet4AddressToIntHTH; import static android.net.shared.Inet4AddressUtils.intToInet4AddressHTH; import static android.net.shared.Inet4AddressUtils.prefixLengthToV4NetmaskIntHTH; import static com.android.server.util.NetworkStackConstants.IPV4_ADDR_BITS; Loading
src/android/net/dhcp/DhcpPacket.java +3 −3 Original line number Diff line number Diff line Loading @@ -3,8 +3,8 @@ package android.net.dhcp; import android.annotation.Nullable; import android.net.DhcpResults; import android.net.LinkAddress; import android.net.NetworkUtils; import android.net.metrics.DhcpErrorEvent; import android.net.shared.Inet4AddressUtils; import android.os.Build; import android.os.SystemProperties; import android.system.OsConstants; Loading Loading @@ -1222,13 +1222,13 @@ public abstract class DhcpPacket { int prefixLength; if (mSubnetMask != null) { try { prefixLength = NetworkUtils.netmaskToPrefixLength(mSubnetMask); prefixLength = Inet4AddressUtils.netmaskToPrefixLength(mSubnetMask); } catch (IllegalArgumentException e) { // Non-contiguous netmask. return null; } } else { prefixLength = NetworkUtils.getImplicitNetmask(ipAddress); prefixLength = Inet4AddressUtils.getImplicitNetmask(ipAddress); } DhcpResults results = new DhcpResults(); Loading
src/android/net/dhcp/DhcpServer.java +2 −2 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.net.dhcp; import static android.net.NetworkUtils.getBroadcastAddress; import static android.net.NetworkUtils.getPrefixMaskAsInet4Address; import static android.net.TrafficStats.TAG_SYSTEM_DHCP_SERVER; import static android.net.dhcp.DhcpPacket.DHCP_CLIENT; import static android.net.dhcp.DhcpPacket.DHCP_HOST_NAME; Loading @@ -25,6 +23,8 @@ import static android.net.dhcp.DhcpPacket.DHCP_SERVER; import static android.net.dhcp.DhcpPacket.ENCAP_BOOTP; import static android.net.dhcp.IDhcpServer.STATUS_INVALID_ARGUMENT; import static android.net.dhcp.IDhcpServer.STATUS_SUCCESS; import static android.net.shared.Inet4AddressUtils.getBroadcastAddress; import static android.net.shared.Inet4AddressUtils.getPrefixMaskAsInet4Address; import static android.system.OsConstants.AF_INET; import static android.system.OsConstants.IPPROTO_UDP; import static android.system.OsConstants.SOCK_DGRAM; Loading
src/android/net/dhcp/DhcpServingParams.java +5 −4 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ package android.net.dhcp; import static android.net.NetworkUtils.getPrefixMaskAsInet4Address; import static android.net.NetworkUtils.intToInet4AddressHTH; import static android.net.shared.Inet4AddressUtils.getPrefixMaskAsInet4Address; import static android.net.shared.Inet4AddressUtils.intToInet4AddressHTH; import static com.android.server.util.NetworkStackConstants.INFINITE_LEASE; import static com.android.server.util.NetworkStackConstants.IPV4_MAX_MTU; Loading @@ -29,7 +29,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.net.IpPrefix; import android.net.LinkAddress; import android.net.NetworkUtils; import android.net.shared.Inet4AddressUtils; import android.util.ArraySet; import java.net.Inet4Address; Loading Loading @@ -164,7 +164,8 @@ public class DhcpServingParams { */ @NonNull public Inet4Address getBroadcastAddress() { return NetworkUtils.getBroadcastAddress(getServerInet4Addr(), serverAddr.getPrefixLength()); return Inet4AddressUtils.getBroadcastAddress( getServerInet4Addr(), serverAddr.getPrefixLength()); } /** Loading