Add Socket tagging for granular data accounting.
Introduces public API to apply "tags" to track data traffic originating
from the current thread. (Under the hood, the tags are maintained and
applied in BlockGuard.) Also adds tag/untag methods for developers who
maintain their own Socket pools.
Change-Id: Ic2dd3155559a93a7b613c7853748d4c44fb3a39e
diff --git a/api/current.txt b/api/current.txt
index 91dbd4b..13fc169 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -10951,6 +10951,7 @@
public class TrafficStats {
ctor public TrafficStats();
+ method public static void clearThreadStatsTag();
method public static long getMobileRxBytes();
method public static long getMobileRxPackets();
method public static long getMobileTxBytes();
@@ -10971,6 +10972,9 @@
method public static long getUidUdpRxPackets(int);
method public static long getUidUdpTxBytes(int);
method public static long getUidUdpTxPackets(int);
+ method public static void setThreadStatsTag(java.lang.String);
+ method public static void tagSocket(java.net.Socket) throws java.net.SocketException;
+ method public static void untagSocket(java.net.Socket) throws java.net.SocketException;
field public static final int UNSUPPORTED = -1; // 0xffffffff
}