diff options
author | 2022-01-18 02:46:23 +0000 | |
---|---|---|
committer | 2022-01-18 02:54:27 +0000 | |
commit | 45f0d14bc794026a6b4b815e464716c4123b890d (patch) | |
tree | 949054643f0492c815b7fb2aaa70da7bdc3582b9 | |
parent | c4c1949aa2c5eb09541ccbc9b2e5b8dbff11d68d (diff) |
[MS63.1] Remove TrafficStats.TAG_SYSTEM_DOWNLOAD dependency
Replace with system Api.
Test: TH
Bug: 204830222
CTS-Coverage-Bug: 215043101
Change-Id: Ic14b26d2862f6fe8bee18fe0c9eaf183052452ee
-rw-r--r-- | core/api/system-current.txt | 1 | ||||
-rw-r--r-- | packages/ConnectivityT/framework-t/src/android/net/TrafficStats.java | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 29957e450e24..3196ef95c071 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -7585,6 +7585,7 @@ package android.net { public class TrafficStats { method public static void setThreadStatsTagApp(); method public static void setThreadStatsTagBackup(); + method public static void setThreadStatsTagDownload(); method public static void setThreadStatsTagRestore(); field public static final int TAG_NETWORK_STACK_IMPERSONATION_RANGE_END = -113; // 0xffffff8f field public static final int TAG_NETWORK_STACK_IMPERSONATION_RANGE_START = -128; // 0xffffff80 diff --git a/packages/ConnectivityT/framework-t/src/android/net/TrafficStats.java b/packages/ConnectivityT/framework-t/src/android/net/TrafficStats.java index 032bc3f40235..1af32bf5524c 100644 --- a/packages/ConnectivityT/framework-t/src/android/net/TrafficStats.java +++ b/packages/ConnectivityT/framework-t/src/android/net/TrafficStats.java @@ -282,6 +282,18 @@ public class TrafficStats { } /** + * 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 * from the current thread. Only one active tag per thread is supported. * {@link #tagSocket(Socket)}. |