diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2011-08-10 17:53:27 -0700 |
|---|---|---|
| committer | Jeff Sharkey <jsharkey@android.com> | 2011-08-15 17:30:25 -0700 |
| commit | b5d55e302d2253e4bfb233ea705caf258cdc4cb9 (patch) | |
| tree | 7acd6751833ddeae0a6dbc97c8608cd986643018 /core/java/android/net/TrafficStats.java | |
| parent | 11f4a48c54f3006778c874662ff04a4d9d157f25 (diff) | |
Foreground/background network stats using sets.
Teach NetworkStats about "counter sets" coming from kernel, and use
them to track usage in foreground/background. Add AID_NET_BW_ACCT to
system_server so it can control counter sets.
Move to composite key of NetworkIdentitySet, UID, set, and tag when
recording historical usage. Persisting still clusters by identity,
since that is heaviest object.
Request async stats poll during systemReady() to bootstrap later
delta calculations. Reset kernel counters when UID removed. Update
various tests.
Bug: 5105592, 5146067
Change-Id: Idabec9e3ffcaf212879821515602ecde0a03de8c
Diffstat (limited to 'core/java/android/net/TrafficStats.java')
| -rw-r--r-- | core/java/android/net/TrafficStats.java | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java index f138e49140fa..c2c5c183d337 100644 --- a/core/java/android/net/TrafficStats.java +++ b/core/java/android/net/TrafficStats.java @@ -205,10 +205,6 @@ public class TrafficStats { * @param operationCount Number of operations to increment count by. */ public static void incrementOperationCount(int tag, int operationCount) { - if (operationCount < 0) { - throw new IllegalArgumentException("operation count can only be incremented"); - } - final INetworkStatsService statsService = INetworkStatsService.Stub.asInterface( ServiceManager.getService(Context.NETWORK_STATS_SERVICE)); final int uid = android.os.Process.myUid(); |
