diff options
author | Remi NGUYEN VAN <reminv@google.com> | 2020-06-08 15:34:22 +0900 |
---|---|---|
committer | Remi NGUYEN VAN <reminv@google.com> | 2020-06-12 18:46:54 +0900 |
commit | c628adc6763aa9a4b08e7c65305236f853d58d20 (patch) | |
tree | 0d3a347532d0e0150fe302cec36c83a5117c3cd3 /src | |
parent | b9364f50bc10ffb539cc773fa5d78d49e205033d (diff) |
Move Inet[4]AddressUtils to libs/net
The classes should not be picked up from frameworks/base, as they are
part of several mainline modules.
Bug: 151052811
Test: m; manual: flashed, wifi and telephony working
Test: atest NetworkStackCoverageTests
Change-Id: I62da3419408b7eb71ea5319e8717fbb22c76a94e
Diffstat (limited to 'src')
-rw-r--r-- | src/android/net/dhcp/DhcpLease.java | 2 | ||||
-rw-r--r-- | src/android/net/dhcp/DhcpLeaseRepository.java | 6 | ||||
-rw-r--r-- | src/android/net/dhcp/DhcpPacket.java | 2 | ||||
-rw-r--r-- | src/android/net/dhcp/DhcpServer.java | 4 | ||||
-rw-r--r-- | src/android/net/dhcp/DhcpServingParams.java | 8 | ||||
-rw-r--r-- | src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreDatabase.java | 4 | ||||
-rw-r--r-- | src/com/android/server/util/NetworkStackConstants.java | 2 |
7 files changed, 14 insertions, 14 deletions
diff --git a/src/android/net/dhcp/DhcpLease.java b/src/android/net/dhcp/DhcpLease.java index 3226f28..0b9cd7c 100644 --- a/src/android/net/dhcp/DhcpLease.java +++ b/src/android/net/dhcp/DhcpLease.java @@ -16,7 +16,7 @@ package android.net.dhcp; -import static android.net.shared.Inet4AddressUtils.inet4AddressToIntHTH; +import static com.android.net.module.util.Inet4AddressUtils.inet4AddressToIntHTH; import android.net.MacAddress; import android.os.SystemClock; diff --git a/src/android/net/dhcp/DhcpLeaseRepository.java b/src/android/net/dhcp/DhcpLeaseRepository.java index b7a2572..8420996 100644 --- a/src/android/net/dhcp/DhcpLeaseRepository.java +++ b/src/android/net/dhcp/DhcpLeaseRepository.java @@ -18,10 +18,10 @@ package android.net.dhcp; 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.net.module.util.Inet4AddressUtils.inet4AddressToIntHTH; +import static com.android.net.module.util.Inet4AddressUtils.intToInet4AddressHTH; +import static com.android.net.module.util.Inet4AddressUtils.prefixLengthToV4NetmaskIntHTH; import static com.android.server.util.NetworkStackConstants.IPV4_ADDR_ANY; import static com.android.server.util.NetworkStackConstants.IPV4_ADDR_BITS; diff --git a/src/android/net/dhcp/DhcpPacket.java b/src/android/net/dhcp/DhcpPacket.java index d022973..3915740 100644 --- a/src/android/net/dhcp/DhcpPacket.java +++ b/src/android/net/dhcp/DhcpPacket.java @@ -22,7 +22,6 @@ import static com.android.server.util.NetworkStackConstants.IPV4_ADDR_ANY; import android.net.DhcpResults; import android.net.LinkAddress; import android.net.metrics.DhcpErrorEvent; -import android.net.shared.Inet4AddressUtils; import android.os.Build; import android.os.SystemProperties; import android.system.OsConstants; @@ -31,6 +30,7 @@ import android.text.TextUtils; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; +import com.android.net.module.util.Inet4AddressUtils; import com.android.networkstack.apishim.common.ShimUtils; import java.io.UnsupportedEncodingException; diff --git a/src/android/net/dhcp/DhcpServer.java b/src/android/net/dhcp/DhcpServer.java index 55b1f28..6c95b5a 100644 --- a/src/android/net/dhcp/DhcpServer.java +++ b/src/android/net/dhcp/DhcpServer.java @@ -23,8 +23,6 @@ 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.dhcp.IDhcpServer.STATUS_UNKNOWN_ERROR; -import static android.net.shared.Inet4AddressUtils.getBroadcastAddress; -import static android.net.shared.Inet4AddressUtils.getPrefixMaskAsInet4Address; import static android.net.util.NetworkStackUtils.DHCP_RAPID_COMMIT_VERSION; import static android.provider.DeviceConfig.NAMESPACE_CONNECTIVITY; import static android.system.OsConstants.AF_INET; @@ -36,6 +34,8 @@ import static android.system.OsConstants.SO_BROADCAST; import static android.system.OsConstants.SO_REUSEADDR; import static com.android.internal.util.TrafficStatsConstants.TAG_SYSTEM_DHCP_SERVER; +import static com.android.net.module.util.Inet4AddressUtils.getBroadcastAddress; +import static com.android.net.module.util.Inet4AddressUtils.getPrefixMaskAsInet4Address; import static com.android.server.util.NetworkStackConstants.INFINITE_LEASE; import static com.android.server.util.NetworkStackConstants.IPV4_ADDR_ALL; import static com.android.server.util.NetworkStackConstants.IPV4_ADDR_ANY; diff --git a/src/android/net/dhcp/DhcpServingParams.java b/src/android/net/dhcp/DhcpServingParams.java index 77cdf7a..97db6ae 100644 --- a/src/android/net/dhcp/DhcpServingParams.java +++ b/src/android/net/dhcp/DhcpServingParams.java @@ -16,9 +16,8 @@ package android.net.dhcp; -import static android.net.shared.Inet4AddressUtils.getPrefixMaskAsInet4Address; -import static android.net.shared.Inet4AddressUtils.intToInet4AddressHTH; - +import static com.android.net.module.util.Inet4AddressUtils.getPrefixMaskAsInet4Address; +import static com.android.net.module.util.Inet4AddressUtils.intToInet4AddressHTH; import static com.android.server.util.NetworkStackConstants.INFINITE_LEASE; import static com.android.server.util.NetworkStackConstants.IPV4_MAX_MTU; import static com.android.server.util.NetworkStackConstants.IPV4_MIN_MTU; @@ -27,12 +26,13 @@ import static java.lang.Integer.toUnsignedLong; import android.net.IpPrefix; import android.net.LinkAddress; -import android.net.shared.Inet4AddressUtils; import android.util.ArraySet; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import com.android.net.module.util.Inet4AddressUtils; + import java.net.Inet4Address; import java.util.Arrays; import java.util.Collections; diff --git a/src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreDatabase.java b/src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreDatabase.java index 0b05a5b..01f039d 100644 --- a/src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreDatabase.java +++ b/src/com/android/server/connectivity/ipmemorystore/IpMemoryStoreDatabase.java @@ -16,8 +16,8 @@ package com.android.server.connectivity.ipmemorystore; -import static android.net.shared.Inet4AddressUtils.inet4AddressToIntHTH; -import static android.net.shared.Inet4AddressUtils.intToInet4AddressHTH; +import static com.android.net.module.util.Inet4AddressUtils.inet4AddressToIntHTH; +import static com.android.net.module.util.Inet4AddressUtils.intToInet4AddressHTH; import android.content.ContentValues; import android.content.Context; diff --git a/src/com/android/server/util/NetworkStackConstants.java b/src/com/android/server/util/NetworkStackConstants.java index dbba7f3..6ecc84c 100644 --- a/src/com/android/server/util/NetworkStackConstants.java +++ b/src/com/android/server/util/NetworkStackConstants.java @@ -16,7 +16,7 @@ package com.android.server.util; -import static android.net.shared.Inet4AddressUtils.intToInet4AddressHTH; +import static com.android.net.module.util.Inet4AddressUtils.intToInet4AddressHTH; import java.net.Inet4Address; |