diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2011-06-19 01:08:12 -0700 |
|---|---|---|
| committer | Jeff Sharkey <jsharkey@android.com> | 2011-06-19 01:08:12 -0700 |
| commit | b09540f33a6cabe50edec0ef32d0b1d0b0d96fff (patch) | |
| tree | c185b8dd5cd0ad100803547c684c74c59346bc5c /core/java/android/net/TrafficStats.java | |
| parent | 1b5a2a96f793211bfbd39aa29cc41031dfa23950 (diff) | |
Handle removed UIDs in network stats and policy.
When UID_REMOVED, clean up any existing UID network policy so it
doesn't linger for future apps. Also move any NetworkStatsHistory
to special UID_REMOVED tracking bucket.
Tests for new removal code. Also test detailed UID stats, including
network changes to verify template matching logic.
Bug: 4584212
Change-Id: I9faadf6b6f3830eb45d86c7f1980a27cdbcdb11e
Diffstat (limited to 'core/java/android/net/TrafficStats.java')
| -rw-r--r-- | core/java/android/net/TrafficStats.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java index e163abfebbd7..cb47193a6eec 100644 --- a/core/java/android/net/TrafficStats.java +++ b/core/java/android/net/TrafficStats.java @@ -42,6 +42,14 @@ public class TrafficStats { public final static int UNSUPPORTED = -1; /** + * Special UID value used when collecting {@link NetworkStatsHistory} for + * removed applications. + * + * @hide + */ + public static final int UID_REMOVED = -4; + + /** * Snapshot of {@link NetworkStats} when the currently active profiling * session started, or {@code null} if no session active. * |
