Merge "[MS63.1] Remove TrafficStats.TAG_SYSTEM_DOWNLOAD dependency"

This commit is contained in:
Treehugger Robot
2022-01-18 13:04:35 +00:00
committed by Gerrit Code Review

View File

@@ -281,6 +281,18 @@ public class TrafficStats {
setThreadStatsTag(TAG_SYSTEM_APP); setThreadStatsTag(TAG_SYSTEM_APP);
} }
/**
* 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 download provider traffic.
*
* @hide
*/
@SystemApi
public static void setThreadStatsTagDownload() {
setThreadStatsTag(TAG_SYSTEM_DOWNLOAD);
}
/** /**
* Get the active tag used when accounting {@link Socket} traffic originating * Get the active tag used when accounting {@link Socket} traffic originating
* from the current thread. Only one active tag per thread is supported. * from the current thread. Only one active tag per thread is supported.