Merge "DHCPv4 anonymity profile: support skipping hostname option" am: eef38717b9 am: 94e328c22f

am: 68700dc757

Change-Id: I7e587b8b45a722c085a1081321357b2f8e9e73c8
This commit is contained in:
Erik Kline
2016-12-14 03:35:45 +00:00
committed by android-build-merger

View File

@@ -7,6 +7,7 @@ import android.net.metrics.DhcpErrorEvent;
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;
@@ -629,7 +630,8 @@ abstract class DhcpPacket {
protected void addCommonClientTlvs(ByteBuffer buf) {
addTlv(buf, DHCP_MAX_MESSAGE_SIZE, (short) MAX_LENGTH);
addTlv(buf, DHCP_VENDOR_CLASS_ID, getVendorId());
addTlv(buf, DHCP_HOST_NAME, getHostname());
final String hn = getHostname();
if (!TextUtils.isEmpty(hn)) addTlv(buf, DHCP_HOST_NAME, hn);
}
/**