java.lang.Object | |
↳ | android.support.v4.net.TrafficStatsCompat |
Helper for accessing features in TrafficStats introduced after API level 14 in a backwards compatible fashion.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Clear active tag used when accounting
Socket
traffic originating
from the current thread.
|
||||||||||
|
Get the active tag used when accounting
Socket
traffic originating
from the current thread.
|
||||||||||
|
Increment count of network operations performed under the accounting tag
currently active on the calling thread.
|
||||||||||
|
Increment count of network operations performed under the given
accounting tag.
|
||||||||||
|
Set active tag to use when accounting
Socket
traffic originating
from the current thread.
|
||||||||||
|
Tag the given
Socket
with any statistics parameters active for
the current thread.
|
||||||||||
|
Remove any statistics parameters from the given
Socket
.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Clear active tag used when accounting
Socket
traffic originating
from the current thread.
Get the active tag used when accounting
Socket
traffic originating
from the current thread. Only one active tag per thread is supported.
tagSocket(Socket)
.
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.
operationCount | Number of operations to increment count by. |
---|
Increment count of network operations performed under the given accounting tag. This can be used to derive bytes-per-operation.
tag |
Accounting tag used in
setThreadStatsTag(int)
.
|
---|---|
operationCount | Number of operations to increment count by. |
Set active tag to use when accounting
Socket
traffic originating
from the current thread. Only one active tag per thread is supported.
Changes only take effect during subsequent calls to
tagSocket(Socket)
.
Tags between
0xFFFFFF00
and
0xFFFFFFFF
are reserved and
used internally by system services like DownloadManager when performing
traffic on behalf of an application.
Tag the given
Socket
with any statistics parameters active for
the current thread. Subsequent calls always replace any existing
parameters. When finished, call
untagSocket(Socket)
to remove
statistics parameters.
SocketException |
---|
Remove any statistics parameters from the given
Socket
.
SocketException |
---|