Loading core/java/android/net/TrafficStats.java +2 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,8 @@ public class TrafficStats { public static final int TAG_SYSTEM_GPS = 0xFFFFFF44; /** @hide */ public static final int TAG_SYSTEM_PAC = 0xFFFFFF45; /** @hide */ public static final int TAG_SYSTEM_DHCP_SERVER = 0xFFFFFF46; private static INetworkStatsService sStatsService; Loading services/net/java/android/net/dhcp/DhcpLeaseRepository.java +1 −10 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ import android.annotation.Nullable; import android.net.IpPrefix; import android.net.MacAddress; import android.net.util.SharedLog; import android.os.SystemClock; import android.net.dhcp.DhcpServer.Clock; import android.util.ArrayMap; import java.net.Inet4Address; Loading Loading @@ -73,15 +73,6 @@ class DhcpLeaseRepository { private int mNumAddresses; private long mLeaseTimeMs; public static class Clock { /** * @see SystemClock#elapsedRealtime() */ public long elapsedRealtime() { return SystemClock.elapsedRealtime(); } } /** * Next timestamp when committed or declined leases should be checked for expired ones. This * will always be lower than or equal to the time for the first lease to expire: it's OK not to Loading services/net/java/android/net/dhcp/DhcpPacket.java +9 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import android.os.Build; import android.os.SystemProperties; import android.system.OsConstants; import android.text.TextUtils; import com.android.internal.annotations.VisibleForTesting; import java.io.UnsupportedEncodingException; Loading Loading @@ -350,6 +351,14 @@ public abstract class DhcpPacket { return mClientId != null; } /** * Convenience method to return the client ID if it was set explicitly, or null otherwise. */ @Nullable public byte[] getExplicitClientIdOrNull() { return hasExplicitClientId() ? getClientId() : null; } /** * Returns the client ID. If not set explicitly, this follows RFC 2132 and creates a client ID * based on the hardware address. Loading services/net/java/android/net/dhcp/DhcpServer.java 0 → 100644 +511 −0 File added.Preview size limit exceeded, changes collapsed. Show changes services/net/java/android/net/util/FdEventsReader.java +2 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ public abstract class FdEventsReader<BufferType> { mBuffer = buffer; } public final void start() { public void start() { if (onCorrectThread()) { createAndRegisterFd(); } else { Loading @@ -100,7 +100,7 @@ public abstract class FdEventsReader<BufferType> { } } public final void stop() { public void stop() { if (onCorrectThread()) { unregisterAndDestroyFd(); } else { Loading Loading
core/java/android/net/TrafficStats.java +2 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,8 @@ public class TrafficStats { public static final int TAG_SYSTEM_GPS = 0xFFFFFF44; /** @hide */ public static final int TAG_SYSTEM_PAC = 0xFFFFFF45; /** @hide */ public static final int TAG_SYSTEM_DHCP_SERVER = 0xFFFFFF46; private static INetworkStatsService sStatsService; Loading
services/net/java/android/net/dhcp/DhcpLeaseRepository.java +1 −10 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ import android.annotation.Nullable; import android.net.IpPrefix; import android.net.MacAddress; import android.net.util.SharedLog; import android.os.SystemClock; import android.net.dhcp.DhcpServer.Clock; import android.util.ArrayMap; import java.net.Inet4Address; Loading Loading @@ -73,15 +73,6 @@ class DhcpLeaseRepository { private int mNumAddresses; private long mLeaseTimeMs; public static class Clock { /** * @see SystemClock#elapsedRealtime() */ public long elapsedRealtime() { return SystemClock.elapsedRealtime(); } } /** * Next timestamp when committed or declined leases should be checked for expired ones. This * will always be lower than or equal to the time for the first lease to expire: it's OK not to Loading
services/net/java/android/net/dhcp/DhcpPacket.java +9 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import android.os.Build; import android.os.SystemProperties; import android.system.OsConstants; import android.text.TextUtils; import com.android.internal.annotations.VisibleForTesting; import java.io.UnsupportedEncodingException; Loading Loading @@ -350,6 +351,14 @@ public abstract class DhcpPacket { return mClientId != null; } /** * Convenience method to return the client ID if it was set explicitly, or null otherwise. */ @Nullable public byte[] getExplicitClientIdOrNull() { return hasExplicitClientId() ? getClientId() : null; } /** * Returns the client ID. If not set explicitly, this follows RFC 2132 and creates a client ID * based on the hardware address. Loading
services/net/java/android/net/dhcp/DhcpServer.java 0 → 100644 +511 −0 File added.Preview size limit exceeded, changes collapsed. Show changes
services/net/java/android/net/util/FdEventsReader.java +2 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ public abstract class FdEventsReader<BufferType> { mBuffer = buffer; } public final void start() { public void start() { if (onCorrectThread()) { createAndRegisterFd(); } else { Loading @@ -100,7 +100,7 @@ public abstract class FdEventsReader<BufferType> { } } public final void stop() { public void stop() { if (onCorrectThread()) { unregisterAndDestroyFd(); } else { Loading