summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/net/NetworkStatsHistory.java9
-rw-r--r--core/java/android/provider/Settings.java2
2 files changed, 4 insertions, 7 deletions
diff --git a/core/java/android/net/NetworkStatsHistory.java b/core/java/android/net/NetworkStatsHistory.java
index d8ac31f..a5cdf70 100644
--- a/core/java/android/net/NetworkStatsHistory.java
+++ b/core/java/android/net/NetworkStatsHistory.java
@@ -441,10 +441,10 @@ public class NetworkStatsHistory implements Parcelable {
final long curStart = bucketStart[i];
final long curEnd = curStart + bucketDuration;
- // bucket is older than record; we're finished
- if (curEnd < start) break;
- // bucket is newer than record; keep looking
- if (curStart > end) continue;
+ // bucket is older than request; we're finished
+ if (curEnd <= start) break;
+ // bucket is newer than request; keep looking
+ if (curStart >= end) continue;
// include full value for active buckets, otherwise only fractional
final boolean activeBucket = curStart < now && curEnd > now;
@@ -466,7 +466,6 @@ public class NetworkStatsHistory implements Parcelable {
if (txPackets != null) entry.txPackets += txPackets[i] * overlap / bucketDuration;
if (operations != null) entry.operations += operations[i] * overlap / bucketDuration;
}
-
return entry;
}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index e5882fc..bc5994e 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -4031,8 +4031,6 @@ public final class Settings {
public static final String NETSTATS_UID_MAX_HISTORY = "netstats_uid_max_history";
/** {@hide} */
public static final String NETSTATS_TAG_MAX_HISTORY = "netstats_tag_max_history";
- /** {@hide} */
- public static final String NETSTATS_FORCE_COMPLETE_POLL = "netstats_force_complete_poll";
/** Preferred NTP server. {@hide} */
public static final String NTP_SERVER = "ntp_server";