Avoid null mobile interfaces.

Bug: 7634215
Change-Id: I6745f6a78c07ba11d98b4562a6b53386112ef652
This commit is contained in:
Jeff Sharkey
2012-11-30 17:49:39 -08:00
parent 526438dbe6
commit 17ffba9700

View File

@@ -903,7 +903,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
ident.add(NetworkIdentity.buildNetworkIdentity(mContext, state)); ident.add(NetworkIdentity.buildNetworkIdentity(mContext, state));
// remember any ifaces associated with mobile networks // remember any ifaces associated with mobile networks
if (isNetworkTypeMobile(state.networkInfo.getType())) { if (isNetworkTypeMobile(state.networkInfo.getType()) && iface != null) {
if (!contains(mMobileIfaces, iface)) { if (!contains(mMobileIfaces, iface)) {
mMobileIfaces = appendElement(String.class, mMobileIfaces, iface); mMobileIfaces = appendElement(String.class, mMobileIfaces, iface);
} }