Persist "tagged" network stats along with UIDs.
Now stores tags other than TAG_NONE (0x0), which are useful for app
debugging. Combine UID and tag together into single long key, and
expose tag data through AIDL when requested. Change NMS to track
TAG_NONE as total UID traffic, matching the kernel definition.
Added TAG_MAX_HISTORY to control how long tag-granularity statistics
are stored; overall UID usage is still kept for UID_MAX_HISTORY. Fix
bug to trim NetworkStatsHistory outside normal polling loops to catch
non-active networks and UIDs.
Test to verify UID and tag packing, and to verify that UID traffic on
two networks are combined to match MOBILE_ALL template.
Change-Id: If0e039416d9e7f63b1a39e04cddfb1133b5a78ee
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 01e028e7..603edf0 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -3800,6 +3800,8 @@
public static final String NETSTATS_UID_BUCKET_DURATION = "netstats_uid_bucket_duration";
/** {@hide} */
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