Get rid of manual int->ipv4 string generation
bug:2542681 Change-Id: I67919d7b5dc8d72eeb2dfb9e3906210b1951d4fb
This commit is contained in:
@@ -18,6 +18,7 @@ package android.net;
|
|||||||
|
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
|
import java.net.InetAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple object for retrieving the results of a DHCP request.
|
* A simple object for retrieving the results of a DHCP request.
|
||||||
@@ -65,10 +66,7 @@ public class DhcpInfo implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void putAddress(StringBuffer buf, int addr) {
|
private static void putAddress(StringBuffer buf, int addr) {
|
||||||
buf.append(addr & 0xff).append('.').
|
buf.append(NetworkUtils.intToInetAddress(addr).getHostAddress());
|
||||||
append((addr >>>= 8) & 0xff).append('.').
|
|
||||||
append((addr >>>= 8) & 0xff).append('.').
|
|
||||||
append((addr >>>= 8) & 0xff);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Implement the Parcelable interface {@hide} */
|
/** Implement the Parcelable interface {@hide} */
|
||||||
|
|||||||
Reference in New Issue
Block a user