Avoid division by zero error when AppOps history is empty.

Test: manual verification
Bug: 143519689
Change-Id: Idbabfcede887382a29e39702d38959639f34b7c7
This commit is contained in:
Stanislav Zholnin
2020-04-24 16:41:32 +01:00
parent 634642bc22
commit d6cc88572b

View File

@@ -2947,7 +2947,7 @@ public class StatsPullAtomService extends SystemService {
}
int processHistoricalOps(HistoricalOps histOps, int atomTag, List<StatsEvent> pulledData) {
int counter = 0;
int counter = 1;
for (int uidIdx = 0; uidIdx < histOps.getUidCount(); uidIdx++) {
final HistoricalUidOps uidOps = histOps.getUidOpsAt(uidIdx);
final int uid = uidOps.getUid();