Merge "Don't plot usage data beyond current date."
This commit is contained in:
committed by
Android (Google) Code Review
commit
34668b6494
@@ -95,9 +95,13 @@ public class ChartDataUsagePreference extends Preference {
|
||||
final SparseIntArray points = new SparseIntArray();
|
||||
points.put(0, 0);
|
||||
|
||||
final long now = System.currentTimeMillis();
|
||||
long totalData = 0;
|
||||
for (NetworkCycleData data : usageSummary) {
|
||||
final long startTime = data.getStartTime();
|
||||
if (startTime > now) {
|
||||
break;
|
||||
}
|
||||
final long endTime = data.getEndTime();
|
||||
|
||||
// increment by current bucket total
|
||||
|
||||
Reference in New Issue
Block a user