From 11caddafb09ebe9a290757bfcfd187a35e54c867 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Tue, 22 Mar 2016 10:20:12 -0600 Subject: [PATCH] Update TrafficStats SystemApi docs. Bug: 25726690 Change-Id: I221d62eaaf1e0fca8c26e4f19cb25d306710a849 --- core/java/android/net/TrafficStats.java | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java index 95ffb44d22e52..cfd0468a6e27c 100644 --- a/core/java/android/net/TrafficStats.java +++ b/core/java/android/net/TrafficStats.java @@ -147,8 +147,10 @@ public class TrafficStats { } /** - * System API for backup-related support components to tag network traffic - * appropriately. + * Set active tag to use when accounting {@link Socket} traffic originating + * from the current thread. The tag used internally is well-defined to + * distinguish all backup-related traffic. + * * @hide */ @SystemApi @@ -157,8 +159,10 @@ public class TrafficStats { } /** - * System API for restore-related support components to tag network traffic - * appropriately. + * Set active tag to use when accounting {@link Socket} traffic originating + * from the current thread. The tag used internally is well-defined to + * distinguish all restore-related traffic. + * * @hide */ @SystemApi @@ -205,7 +209,13 @@ public class TrafficStats { NetworkManagementSocketTagger.setThreadSocketStatsUid(uid); } - /** {@hide} */ + /** + * Clear any active UID set to account {@link Socket} traffic originating + * from the current thread. + * + * @see #setThreadStatsUid(int) + * @hide + */ @SystemApi public static void clearThreadStatsUid() { NetworkManagementSocketTagger.setThreadSocketStatsUid(-1);