Fix NPE during dumpsys ethernet
Handle the case when IpClient wasn't created for network interface which
may happen for virtual device
Bug: 78482534
Test: dumpsys ethernet
Merged-In: I374a91265660e814b4f0f033b3970fd98921ca84
Merged-In: Id4ab7c9a8a5238491c8405ae260862e76a7671c1
Change-Id: I3405dd4f72d4a6444448f0d6ec0497aead07bade
(cherry picked from commit 97446b8978)
This commit is contained in:
committed by
Erik Kline
parent
7048285cb3
commit
aea0136d01
@@ -440,7 +440,12 @@ public class EthernetNetworkFactory extends NetworkFactory {
|
||||
NetworkInterfaceState ifaceState = mTrackingInterfaces.get(iface);
|
||||
pw.println(iface + ":" + ifaceState);
|
||||
pw.increaseIndent();
|
||||
ifaceState.mIpClient.dump(fd, pw, args);
|
||||
final IpClient ipClient = ifaceState.mIpClient;
|
||||
if (ipClient != null) {
|
||||
ipClient.dump(fd, pw, args);
|
||||
} else {
|
||||
pw.println("IpClient is null");
|
||||
}
|
||||
pw.decreaseIndent();
|
||||
}
|
||||
pw.decreaseIndent();
|
||||
|
||||
Reference in New Issue
Block a user