diff options
author | Chiachang Wang <chiachangwang@google.com> | 2019-09-06 15:05:32 +0800 |
---|---|---|
committer | Chiachang Wang <chiachangwang@google.com> | 2019-09-06 16:44:03 +0800 |
commit | bc1a101386fb8ee6201bbb9e21e1988b33e22d03 (patch) | |
tree | 45ca16ee77aff63b06c5a802089d416a3690c77b /src/android | |
parent | fbb796b347092b99277d5440d646d4415e006520 (diff) |
Update connectivity namespace definition
Since DeviceConfig is available in aosp, update the definition
reference from DeviceConfig instead of local definition.
Bug: 120013793
Test: atest NetworkStackTests
Change-Id: I3da82bd822ec340b98ad0b683478bd14ae94693c
Diffstat (limited to 'src/android')
-rw-r--r-- | src/android/net/dhcp/DhcpClient.java | 5 | ||||
-rw-r--r-- | src/android/net/util/NetworkStackUtils.java | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/android/net/dhcp/DhcpClient.java b/src/android/net/dhcp/DhcpClient.java index a140f4d..bf63c1c 100644 --- a/src/android/net/dhcp/DhcpClient.java +++ b/src/android/net/dhcp/DhcpClient.java @@ -31,6 +31,7 @@ import static android.net.dhcp.DhcpPacket.INADDR_BROADCAST; import static android.net.dhcp.DhcpPacket.INFINITE_LEASE; import static android.net.util.NetworkStackUtils.closeSocketQuietly; import static android.net.util.SocketUtils.makePacketSocketAddress; +import static android.provider.DeviceConfig.NAMESPACE_CONNECTIVITY; import static android.system.OsConstants.AF_INET; import static android.system.OsConstants.AF_PACKET; import static android.system.OsConstants.ETH_P_IP; @@ -361,7 +362,7 @@ public class DhcpClient extends StateMachine { * */ public boolean isDhcpLeaseCacheEnabled() { - return mDependencies.getBooleanDeviceConfig(NetworkStackUtils.NAMESPACE_CONNECTIVITY, + return mDependencies.getBooleanDeviceConfig(NAMESPACE_CONNECTIVITY, NetworkStackUtils.DHCP_INIT_REBOOT_ENABLED); } @@ -369,7 +370,7 @@ public class DhcpClient extends StateMachine { * check whether or not to support DHCP Rapid Commit option. */ public boolean isDhcpRapidCommitEnabled() { - return mDependencies.getBooleanDeviceConfig(NetworkStackUtils.NAMESPACE_CONNECTIVITY, + return mDependencies.getBooleanDeviceConfig(NAMESPACE_CONNECTIVITY, NetworkStackUtils.DHCP_RAPID_COMMIT_ENABLED); } diff --git a/src/android/net/util/NetworkStackUtils.java b/src/android/net/util/NetworkStackUtils.java index 4e340ce..596e5e3 100644 --- a/src/android/net/util/NetworkStackUtils.java +++ b/src/android/net/util/NetworkStackUtils.java @@ -34,9 +34,6 @@ import java.util.function.Predicate; * Collection of utilities for the network stack. */ public class NetworkStackUtils { - // TODO: Refer to DeviceConfig definition. - public static final String NAMESPACE_CONNECTIVITY = "connectivity"; - /** * A list of captive portal detection specifications used in addition to the fallback URLs. * Each spec has the format url@@/@@statusCodeRegex@@/@@contentRegex. Specs are separated |