am d808bd6e: am f0bbc494: Merge "Avoid NPE when missing network stats." into ics-mr1

* commit 'd808bd6e22547c144c6384c2bc6490853108ded6':
  Avoid NPE when missing network stats.
This commit is contained in:
Jeff Sharkey
2011-12-12 20:23:47 -08:00
committed by Android Git Automerger

View File

@@ -1060,8 +1060,10 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
}
// clear UID from current stats snapshot
mLastPollUidSnapshot = mLastPollUidSnapshot.withoutUid(uid);
mLastPollNetworkXtSnapshot = computeNetworkXtSnapshotFromUid(mLastPollUidSnapshot);
if (mLastPollUidSnapshot != null) {
mLastPollUidSnapshot = mLastPollUidSnapshot.withoutUid(uid);
mLastPollNetworkXtSnapshot = computeNetworkXtSnapshotFromUid(mLastPollUidSnapshot);
}
// clear kernel stats associated with UID
resetKernelUidStats(uid);