/**@class android.net.TrafficStats @extends java.lang.Object Class that provides network traffic statistics. These statistics include bytes transmitted and received and network packets transmitted and received, over all interfaces, over the mobile interface, and on a per-UID basis. <p> These statistics may not be available on all platforms. If the statistics are not supported by this device, {@link #UNSUPPORTED} will be returned. */ var TrafficStats = { /** The return value to indicate that the device does not support the statistic. */ UNSUPPORTED : "-1", /**@hide */ KB_IN_BYTES : "1024", /**@hide */ MB_IN_BYTES : "1048576", /**@hide */ GB_IN_BYTES : "1073741824", /**@hide */ TB_IN_BYTES : "1099511627776", /**@hide */ PB_IN_BYTES : "1125899906842624", /** Special UID value used when collecting {@link android.net.NetworkStatsHistory} for removed applications. @hide */ UID_REMOVED : "-4", /** Special UID value used when collecting {@link android.net.NetworkStatsHistory} for tethering traffic. @hide */ UID_TETHERING : "-5", /** Default tag value for {@link DownloadManager} traffic. @hide */ TAG_SYSTEM_DOWNLOAD : "-255", /** Default tag value for {@link MediaPlayer} traffic. @hide */ TAG_SYSTEM_MEDIA : "-254", /** Default tag value for {@link BackupManager} traffic. @hide */ TAG_SYSTEM_BACKUP : "-253", /**Set active tag to use when accounting {@link Socket} traffic originating from the current thread. Only one active tag per thread is supported. <p> Changes only take effect during subsequent calls to {@link #tagSocket}(Socket). <p> Tags between {@code 0xFFFFFF00} and {@code 0xFFFFFFFF} are reserved and used internally by system services like {@link DownloadManager} when performing traffic on behalf of an application. @see #clearThreadStatsTag() */ setThreadStatsTag : function( ) {}, /**System API for backup-related support components to tag network traffic appropriately. @hide */ setThreadStatsTagBackup : function( ) {}, /**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). @see #setThreadStatsTag(int) */ getThreadStatsTag : function( ) {}, /**Clear any active tag set to account {@link Socket} traffic originating from the current thread. @see #setThreadStatsTag(int) */ clearThreadStatsTag : function( ) {}, /**Set specific UID to use when accounting {@link Socket} traffic originating from the current thread. Designed for use when performing an operation on behalf of another application. <p> Changes only take effect during subsequent calls to {@link #tagSocket}(Socket). <p> To take effect, caller must hold {@link android.Manifest.permission#UPDATE_DEVICE_STATS} permission. @hide */ setThreadStatsUid : function( ) {}, /**{@hide} */ clearThreadStatsUid : function( ) {}, /**Tag the given {@link Socket} with any statistics parameters active for the current thread. Subsequent calls always replace any existing parameters. When finished, call {@link #untagSocket}(Socket) to remove statistics parameters. @see #setThreadStatsTag(int) @see #setThreadStatsUid(int) */ tagSocket : function( ) {}, /**Remove any statistics parameters from the given {@link Socket}. */ untagSocket : function( ) {}, /**Start profiling data usage for current UID. Only one profiling session can be active at a time. @hide */ startDataProfiling : function( ) {}, /**Stop profiling data usage for current UID. @return {Object {android.net.NetworkStats}} Detailed {@link NetworkStats} of data that occurred since last {@link #startDataProfiling(Context)} call. @hide */ stopDataProfiling : function( ) {}, /**Increment count of network operations performed under the accounting tag currently active on the calling thread. This can be used to derive bytes-per-operation. @param {Number} operationCount Number of operations to increment count by. */ incrementOperationCount : function( ) {}, /**Increment count of network operations performed under the given accounting tag. This can be used to derive bytes-per-operation. @param {Number} tag Accounting tag used in {@link #setThreadStatsTag(int)}. @param {Number} operationCount Number of operations to increment count by. */ incrementOperationCount : function( ) {}, /**{@hide} */ closeQuietly : function( ) {}, /**Return number of packets transmitted across mobile networks since device boot. Counts packets across all mobile network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage. <p> Before {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, this may return {@link #UNSUPPORTED} on devices where statistics aren't available. */ getMobileTxPackets : function( ) {}, /**Return number of packets received across mobile networks since device boot. Counts packets across all mobile network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage. <p> Before {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, this may return {@link #UNSUPPORTED} on devices where statistics aren't available. */ getMobileRxPackets : function( ) {}, /**Return number of bytes transmitted across mobile networks since device boot. Counts packets across all mobile network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage. <p> Before {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, this may return {@link #UNSUPPORTED} on devices where statistics aren't available. */ getMobileTxBytes : function( ) {}, /**Return number of bytes received across mobile networks since device boot. Counts packets across all mobile network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage. <p> Before {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, this may return {@link #UNSUPPORTED} on devices where statistics aren't available. */ getMobileRxBytes : function( ) {}, /**{@hide} */ getMobileTcpRxPackets : function( ) {}, /**{@hide} */ getMobileTcpTxPackets : function( ) {}, /**{@hide} */ getTxPackets : function( ) {}, /**{@hide} */ getRxPackets : function( ) {}, /**{@hide} */ getTxBytes : function( ) {}, /**{@hide} */ getRxBytes : function( ) {}, /**Return number of packets transmitted since device boot. Counts packets across all network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage. <p> Before {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, this may return {@link #UNSUPPORTED} on devices where statistics aren't available. */ getTotalTxPackets : function( ) {}, /**Return number of packets received since device boot. Counts packets across all network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage. <p> Before {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, this may return {@link #UNSUPPORTED} on devices where statistics aren't available. */ getTotalRxPackets : function( ) {}, /**Return number of bytes transmitted since device boot. Counts packets across all network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage. <p> Before {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, this may return {@link #UNSUPPORTED} on devices where statistics aren't available. */ getTotalTxBytes : function( ) {}, /**Return number of bytes received since device boot. Counts packets across all network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage. <p> Before {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, this may return {@link #UNSUPPORTED} on devices where statistics aren't available. */ getTotalRxBytes : function( ) {}, /**Return number of bytes transmitted by the given UID since device boot. Counts packets across all network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage. <p> Before {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, this may return {@link #UNSUPPORTED} on devices where statistics aren't available. @see android.os.Process#myUid() @see android.content.pm.ApplicationInfo#uid */ getUidTxBytes : function( ) {}, /**Return number of bytes received by the given UID since device boot. Counts packets across all network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage. <p> Before {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, this may return {@link #UNSUPPORTED} on devices where statistics aren't available. @see android.os.Process#myUid() @see android.content.pm.ApplicationInfo#uid */ getUidRxBytes : function( ) {}, /**Return number of packets transmitted by the given UID since device boot. Counts packets across all network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage. <p> Before {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, this may return {@link #UNSUPPORTED} on devices where statistics aren't available. @see android.os.Process#myUid() @see android.content.pm.ApplicationInfo#uid */ getUidTxPackets : function( ) {}, /**Return number of packets received by the given UID since device boot. Counts packets across all network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage. <p> Before {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, this may return {@link #UNSUPPORTED} on devices where statistics aren't available. @see android.os.Process#myUid() @see android.content.pm.ApplicationInfo#uid */ getUidRxPackets : function( ) {}, /** @deprecated Starting in {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, transport layer statistics are no longer available, and will always return {@link #UNSUPPORTED}. @see #getUidTxBytes(int) */ getUidTcpTxBytes : function( ) {}, /** @deprecated Starting in {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, transport layer statistics are no longer available, and will always return {@link #UNSUPPORTED}. @see #getUidRxBytes(int) */ getUidTcpRxBytes : function( ) {}, /** @deprecated Starting in {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, transport layer statistics are no longer available, and will always return {@link #UNSUPPORTED}. @see #getUidTxBytes(int) */ getUidUdpTxBytes : function( ) {}, /** @deprecated Starting in {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, transport layer statistics are no longer available, and will always return {@link #UNSUPPORTED}. @see #getUidRxBytes(int) */ getUidUdpRxBytes : function( ) {}, /** @deprecated Starting in {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, transport layer statistics are no longer available, and will always return {@link #UNSUPPORTED}. @see #getUidTxPackets(int) */ getUidTcpTxSegments : function( ) {}, /** @deprecated Starting in {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, transport layer statistics are no longer available, and will always return {@link #UNSUPPORTED}. @see #getUidRxPackets(int) */ getUidTcpRxSegments : function( ) {}, /** @deprecated Starting in {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, transport layer statistics are no longer available, and will always return {@link #UNSUPPORTED}. @see #getUidTxPackets(int) */ getUidUdpTxPackets : function( ) {}, /** @deprecated Starting in {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, transport layer statistics are no longer available, and will always return {@link #UNSUPPORTED}. @see #getUidRxPackets(int) */ getUidUdpRxPackets : function( ) {}, };