Merge "IpManager,DhcpClient: catch some errors and better logging" into nyc-dev

am: 5486aabc74

* commit '5486aabc747501da868985a9df5e4d24d2395fda':
  IpManager,DhcpClient: catch some errors and better logging

Change-Id: Idc9d3d0aefbd7dedaa31a2f21b06ca80f4383c30
This commit is contained in:
Erik Kline
2016-04-22 03:21:47 +00:00
committed by android-build-merger
2 changed files with 3 additions and 3 deletions

View File

@@ -264,8 +264,8 @@ public class DhcpClient extends StateMachine {
mInterfaceBroadcastAddr = new PacketSocketAddress(mIface.getIndex(),
DhcpPacket.ETHER_BROADCAST);
return true;
} catch(SocketException e) {
Log.wtf(TAG, "Can't determine ifindex or MAC address for " + mIfaceName);
} catch(SocketException | NullPointerException e) {
Log.e(TAG, "Can't determine ifindex or MAC address for " + mIfaceName, e);
return false;
}
}

View File

@@ -690,7 +690,7 @@ public class IpManager extends StateMachine {
final InterfaceConfiguration ifcg = new InterfaceConfiguration();
ifcg.setLinkAddress(new LinkAddress("0.0.0.0/0"));
mNwService.setInterfaceConfig(mInterfaceName, ifcg);
} catch (RemoteException e) {
} catch (IllegalStateException | RemoteException e) {
Log.e(mTag, "ALERT: Failed to clear IPv4 address on interface " + mInterfaceName, e);
}
}