Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -20306,6 +20306,7 @@ package android.net { method public static void incrementOperationCount(int, int); method public static void setThreadStatsTag(int); method public static void setThreadStatsTagBackup(); method public static void setThreadStatsTagRestore(); method public static void setThreadStatsUid(int); method public static void tagSocket(java.net.Socket) throws java.net.SocketException; method public static void untagSocket(java.net.Socket) throws java.net.SocketException; core/java/android/net/TrafficStats.java +20 −1 Original line number Diff line number Diff line Loading @@ -87,12 +87,21 @@ public class TrafficStats { public static final int TAG_SYSTEM_MEDIA = 0xFFFFFF02; /** * Default tag value for {@link BackupManager} traffic. * Default tag value for {@link BackupManager} backup traffic; that is, * traffic from the device to the storage backend. * * @hide */ public static final int TAG_SYSTEM_BACKUP = 0xFFFFFF03; /** * Default tag value for {@link BackupManager} restore traffic; that is, * app data retrieved from the storage backend at install time. * * @hide */ public static final int TAG_SYSTEM_RESTORE = 0xFFFFFF04; private static INetworkStatsService sStatsService; private synchronized static INetworkStatsService getStatsService() { Loading Loading @@ -141,6 +150,16 @@ public class TrafficStats { setThreadStatsTag(TAG_SYSTEM_BACKUP); } /** * System API for restore-related support components to tag network traffic * appropriately. * @hide */ @SystemApi public static void setThreadStatsTagRestore() { setThreadStatsTag(TAG_SYSTEM_RESTORE); } /** * Get the active tag used when accounting {@link Socket} traffic originating * from the current thread. Only one active tag per thread is supported. Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -20306,6 +20306,7 @@ package android.net { method public static void incrementOperationCount(int, int); method public static void setThreadStatsTag(int); method public static void setThreadStatsTagBackup(); method public static void setThreadStatsTagRestore(); method public static void setThreadStatsUid(int); method public static void tagSocket(java.net.Socket) throws java.net.SocketException; method public static void untagSocket(java.net.Socket) throws java.net.SocketException;
core/java/android/net/TrafficStats.java +20 −1 Original line number Diff line number Diff line Loading @@ -87,12 +87,21 @@ public class TrafficStats { public static final int TAG_SYSTEM_MEDIA = 0xFFFFFF02; /** * Default tag value for {@link BackupManager} traffic. * Default tag value for {@link BackupManager} backup traffic; that is, * traffic from the device to the storage backend. * * @hide */ public static final int TAG_SYSTEM_BACKUP = 0xFFFFFF03; /** * Default tag value for {@link BackupManager} restore traffic; that is, * app data retrieved from the storage backend at install time. * * @hide */ public static final int TAG_SYSTEM_RESTORE = 0xFFFFFF04; private static INetworkStatsService sStatsService; private synchronized static INetworkStatsService getStatsService() { Loading Loading @@ -141,6 +150,16 @@ public class TrafficStats { setThreadStatsTag(TAG_SYSTEM_BACKUP); } /** * System API for restore-related support components to tag network traffic * appropriately. * @hide */ @SystemApi public static void setThreadStatsTagRestore() { setThreadStatsTag(TAG_SYSTEM_RESTORE); } /** * Get the active tag used when accounting {@link Socket} traffic originating * from the current thread. Only one active tag per thread is supported. Loading