am dfe55787: am c584a24b: am 2140d1de: Merge "Avoid system_server crashing due to mac address is null"

* commit 'dfe5578771080bf225225d3c903e186d92f5b274':
  Avoid system_server crashing due to mac address is null
This commit is contained in:
Irfan Sheriff
2012-08-22 11:04:53 -07:00
committed by Android Git Automerger

View File

@@ -58,9 +58,11 @@ public class ArpPeer {
mInterfaceName = interfaceName;
mMyAddr = myAddr;
for (int i = 0; i < MAC_ADDR_LENGTH; i++) {
mMyMac[i] = (byte) Integer.parseInt(mac.substring(
i*3, (i*3) + 2), 16);
if (mac != null) {
for (int i = 0; i < MAC_ADDR_LENGTH; i++) {
mMyMac[i] = (byte) Integer.parseInt(mac.substring(
i*3, (i*3) + 2), 16);
}
}
if (myAddr instanceof Inet6Address || peer instanceof Inet6Address) {