public static class NetworkStats.Bucket extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
NetworkStats.Bucket.Roaming |
static interface |
NetworkStats.Bucket.State |
Modifier and Type | Field and Description |
---|---|
static int |
ROAMING_ALL
Combined usage across all roaming states.
|
static int |
ROAMING_NO
Usage that occurs on a home, non-roaming network.
|
static int |
ROAMING_YES
Usage that occurs on a roaming network.
|
static int |
STATE_ALL
Combined usage across all states.
|
static int |
STATE_DEFAULT
Usage not accounted for in any other state.
|
static int |
STATE_FOREGROUND
Foreground usage.
|
static int |
TAG_NONE
Special TAG value for total data across all tags
|
static int |
UID_ALL
Special UID value for aggregate/unspecified.
|
static int |
UID_REMOVED
Special UID value for removed apps.
|
static int |
UID_TETHERING
Special UID value for data usage by tethering.
|
Constructor and Description |
---|
Bucket() |
Modifier and Type | Method and Description |
---|---|
long |
getEndTimeStamp()
End timestamp of the bucket's time interval.
|
int |
getRoaming()
Roaming state.
|
long |
getRxBytes()
Number of bytes received during the bucket's time interval.
|
long |
getRxPackets()
Number of packets received during the bucket's time interval.
|
long |
getStartTimeStamp()
Start timestamp of the bucket's time interval.
|
int |
getState()
Usage state.
|
int |
getTag()
Tag of the bucket.
|
long |
getTxBytes()
Number of bytes transmitted during the bucket's time interval.
|
long |
getTxPackets()
Number of packets transmitted during the bucket's time interval.
|
int |
getUid()
Key of the bucket.
|
public static final int STATE_ALL
public static final int STATE_DEFAULT
public static final int STATE_FOREGROUND
public static final int UID_ALL
public static final int UID_REMOVED
public static final int UID_TETHERING
public static final int ROAMING_ALL
public static final int ROAMING_NO
Any cellular usage in this bucket was incurred while the device was connected to a tower owned or operated by the user's wireless carrier, or a tower that the user's wireless carrier has indicated should be treated as a home network regardless.
This is also the default value for network types that do not support roaming.
public static final int ROAMING_YES
Any cellular usage in this bucket as incurred while the device was roaming on another carrier's network, for which additional charges may apply.
public static final int TAG_NONE
public int getUid()
public int getTag()
public int getState()
public int getRoaming()
public long getStartTimeStamp()
System.currentTimeMillis()
.public long getEndTimeStamp()
System.currentTimeMillis()
.public long getRxBytes()
public long getTxBytes()
public long getRxPackets()
public long getTxPackets()