Merge "Omaha #4903 Fix progressive disclosure counting problem." into omaha_16.2.2

Former-commit-id: 2d45beee32683caf839c452c96a357dafa5bd3e3
This commit is contained in:
Nate Jensen 2015-12-09 15:30:03 -06:00 committed by Gerrit Code Review
commit b1d4c0bb1b

View file

@ -235,7 +235,6 @@ public class GenericProgressiveDisclosure<T extends PlotItem> {
if (items.size() < staticToDynamicThreshold) {
double distance = getMinDistance(items, info);
info.setDistance(distance);
staticCount += 1;
} else if (checkDuplicate) {
for (ItemInfo<T> itemToCheck : items) {
if (itemToCheck.getItem().getLocation()
@ -245,9 +244,11 @@ public class GenericProgressiveDisclosure<T extends PlotItem> {
}
}
}
if (!info.hasDistance() || info.getDistance() > 0) {
if (!info.hasDistance()) {
items.add(info);
} else if (info.getDistance() > 0) {
staticCount += 1;
items.add(info);
}
}
waitingTasks.decrementAndGet();