Avoid NPE when missing network stats.
Bug: 5750339 Change-Id: I4b739dbd076b270a5a2b2e2a1e0f6e445d8c124e
This commit is contained in:
@@ -1060,8 +1060,10 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clear UID from current stats snapshot
|
// clear UID from current stats snapshot
|
||||||
mLastPollUidSnapshot = mLastPollUidSnapshot.withoutUid(uid);
|
if (mLastPollUidSnapshot != null) {
|
||||||
mLastPollNetworkXtSnapshot = computeNetworkXtSnapshotFromUid(mLastPollUidSnapshot);
|
mLastPollUidSnapshot = mLastPollUidSnapshot.withoutUid(uid);
|
||||||
|
mLastPollNetworkXtSnapshot = computeNetworkXtSnapshotFromUid(mLastPollUidSnapshot);
|
||||||
|
}
|
||||||
|
|
||||||
// clear kernel stats associated with UID
|
// clear kernel stats associated with UID
|
||||||
resetKernelUidStats(uid);
|
resetKernelUidStats(uid);
|
||||||
|
|||||||
Reference in New Issue
Block a user