public abstract static class BatteryStats.Uid extends Object
Modifier and Type | Class and Description |
---|---|
class |
BatteryStats.Uid.Pid |
static class |
BatteryStats.Uid.Pkg
The statistics associated with a particular package.
|
static class |
BatteryStats.Uid.Proc
The statistics associated with a particular process.
|
static class |
BatteryStats.Uid.Sensor |
static class |
BatteryStats.Uid.Wakelock
The statistics associated with a particular wake lock.
|
Modifier and Type | Field and Description |
---|---|
static int |
NUM_PROCESS_STATE
Total number of process states we track.
|
static int |
NUM_USER_ACTIVITY_TYPES |
static int |
NUM_WIFI_BATCHED_SCAN_BINS |
static int |
PROCESS_STATE_BACKGROUND
Time this uid has any process in an active background state, but none in the
"foreground" or better state.
|
static int |
PROCESS_STATE_CACHED
Time this uid has any processes that are sitting around cached, not in one of the
other active states.
|
static int |
PROCESS_STATE_FOREGROUND
Time this uid has any process in an active foreground state, but none in the
"top sleeping" or better state.
|
static int |
PROCESS_STATE_FOREGROUND_SERVICE
Time this uid has any process with a started out bound foreground service, but
none in the "top" state.
|
static int |
PROCESS_STATE_TOP
Time this uid has any processes in the top state (or above such as persistent).
|
static int |
PROCESS_STATE_TOP_SLEEPING
Time this uid has any process that is top while the device is sleeping, but none
in the "foreground service" or better state.
|
Constructor and Description |
---|
Uid() |
Modifier and Type | Method and Description |
---|---|
abstract BatteryStats.Timer |
getAudioTurnedOnTimer() |
abstract BatteryStats.ControllerActivityCounter |
getBluetoothControllerActivity() |
abstract BatteryStats.Timer |
getBluetoothScanTimer() |
abstract BatteryStats.Timer |
getCameraTurnedOnTimer() |
abstract long |
getCpuPowerMaUs(int which)
Get the total cpu power consumed (in milli-ampere-microseconds).
|
abstract BatteryStats.Timer |
getFlashlightTurnedOnTimer() |
abstract BatteryStats.Timer |
getForegroundActivityTimer() |
abstract long |
getFullWifiLockTime(long elapsedRealtimeUs,
int which) |
abstract ArrayMap<String,? extends BatteryStats.Timer> |
getJobStats()
Returns a mapping containing scheduled job statistics.
|
abstract int |
getMobileRadioActiveCount(int which) |
abstract long |
getMobileRadioActiveTime(int which) |
abstract long |
getMobileRadioApWakeupCount(int which)
Returns the number of times this UID woke up the Application Processor to
process a mobile radio packet.
|
abstract BatteryStats.ControllerActivityCounter |
getModemControllerActivity() |
abstract long |
getNetworkActivityBytes(int type,
int which) |
abstract long |
getNetworkActivityPackets(int type,
int which) |
abstract ArrayMap<String,? extends BatteryStats.Uid.Pkg> |
getPackageStats()
Returns a mapping containing package statistics.
|
abstract SparseArray<? extends BatteryStats.Uid.Pid> |
getPidStats()
Returns a mapping containing active process data.
|
abstract long |
getProcessStateTime(int state,
long elapsedRealtimeUs,
int which) |
abstract BatteryStats.Timer |
getProcessStateTimer(int state) |
abstract ArrayMap<String,? extends BatteryStats.Uid.Proc> |
getProcessStats()
Returns a mapping containing process statistics.
|
abstract SparseArray<? extends BatteryStats.Uid.Sensor> |
getSensorStats()
Returns a mapping containing sensor statistics.
|
abstract ArrayMap<String,? extends BatteryStats.Timer> |
getSyncStats()
Returns a mapping containing sync statistics.
|
abstract long |
getSystemCpuTimeUs(int which)
Get the total cpu time (in microseconds) this UID had processes executing kernel syscalls.
|
abstract long |
getTimeAtCpuSpeed(int cluster,
int step,
int which)
Returns the approximate cpu time (in milliseconds) spent at a certain CPU speed for a
given CPU cluster.
|
abstract int |
getUid() |
abstract int |
getUserActivityCount(int type,
int which) |
abstract long |
getUserCpuTimeUs(int which)
Get the total cpu time (in microseconds) this UID had processes executing in userspace.
|
abstract BatteryStats.Timer |
getVibratorOnTimer() |
abstract BatteryStats.Timer |
getVideoTurnedOnTimer() |
abstract ArrayMap<String,? extends BatteryStats.Uid.Wakelock> |
getWakelockStats()
Returns a mapping containing wakelock statistics.
|
abstract int |
getWifiBatchedScanCount(int csphBin,
int which) |
abstract long |
getWifiBatchedScanTime(int csphBin,
long elapsedRealtimeUs,
int which) |
abstract BatteryStats.ControllerActivityCounter |
getWifiControllerActivity() |
abstract long |
getWifiMulticastTime(long elapsedRealtimeUs,
int which) |
abstract long |
getWifiRadioApWakeupCount(int which)
Returns the number of times this UID woke up the Application Processor to
process a WiFi packet.
|
abstract long |
getWifiRunningTime(long elapsedRealtimeUs,
int which) |
abstract int |
getWifiScanCount(int which) |
abstract long |
getWifiScanTime(long elapsedRealtimeUs,
int which) |
abstract boolean |
hasNetworkActivity() |
abstract boolean |
hasUserActivity() |
abstract void |
noteActivityPausedLocked(long elapsedRealtime) |
abstract void |
noteActivityResumedLocked(long elapsedRealtime) |
abstract void |
noteFullWifiLockAcquiredLocked(long elapsedRealtime) |
abstract void |
noteFullWifiLockReleasedLocked(long elapsedRealtime) |
abstract void |
noteUserActivityLocked(int type) |
abstract void |
noteWifiBatchedScanStartedLocked(int csph,
long elapsedRealtime) |
abstract void |
noteWifiBatchedScanStoppedLocked(long elapsedRealtime) |
abstract void |
noteWifiMulticastDisabledLocked(long elapsedRealtime) |
abstract void |
noteWifiMulticastEnabledLocked(long elapsedRealtime) |
abstract void |
noteWifiRunningLocked(long elapsedRealtime) |
abstract void |
noteWifiScanStartedLocked(long elapsedRealtime) |
abstract void |
noteWifiScanStoppedLocked(long elapsedRealtime) |
abstract void |
noteWifiStoppedLocked(long elapsedRealtime) |
public static final int PROCESS_STATE_TOP
public static final int PROCESS_STATE_FOREGROUND_SERVICE
public static final int PROCESS_STATE_TOP_SLEEPING
public static final int PROCESS_STATE_FOREGROUND
public static final int PROCESS_STATE_BACKGROUND
public static final int PROCESS_STATE_CACHED
public static final int NUM_PROCESS_STATE
public static final int NUM_WIFI_BATCHED_SCAN_BINS
public static final int NUM_USER_ACTIVITY_TYPES
public abstract ArrayMap<String,? extends BatteryStats.Uid.Wakelock> getWakelockStats()
public abstract ArrayMap<String,? extends BatteryStats.Timer> getSyncStats()
public abstract ArrayMap<String,? extends BatteryStats.Timer> getJobStats()
public abstract SparseArray<? extends BatteryStats.Uid.Sensor> getSensorStats()
public abstract SparseArray<? extends BatteryStats.Uid.Pid> getPidStats()
public abstract ArrayMap<String,? extends BatteryStats.Uid.Proc> getProcessStats()
public abstract ArrayMap<String,? extends BatteryStats.Uid.Pkg> getPackageStats()
public abstract BatteryStats.ControllerActivityCounter getWifiControllerActivity()
public abstract BatteryStats.ControllerActivityCounter getBluetoothControllerActivity()
public abstract BatteryStats.ControllerActivityCounter getModemControllerActivity()
public abstract int getUid()
public abstract void noteWifiRunningLocked(long elapsedRealtime)
public abstract void noteWifiStoppedLocked(long elapsedRealtime)
public abstract void noteFullWifiLockAcquiredLocked(long elapsedRealtime)
public abstract void noteFullWifiLockReleasedLocked(long elapsedRealtime)
public abstract void noteWifiScanStartedLocked(long elapsedRealtime)
public abstract void noteWifiScanStoppedLocked(long elapsedRealtime)
public abstract void noteWifiBatchedScanStartedLocked(int csph, long elapsedRealtime)
public abstract void noteWifiBatchedScanStoppedLocked(long elapsedRealtime)
public abstract void noteWifiMulticastEnabledLocked(long elapsedRealtime)
public abstract void noteWifiMulticastDisabledLocked(long elapsedRealtime)
public abstract void noteActivityResumedLocked(long elapsedRealtime)
public abstract void noteActivityPausedLocked(long elapsedRealtime)
public abstract long getWifiRunningTime(long elapsedRealtimeUs, int which)
public abstract long getFullWifiLockTime(long elapsedRealtimeUs, int which)
public abstract long getWifiScanTime(long elapsedRealtimeUs, int which)
public abstract int getWifiScanCount(int which)
public abstract long getWifiBatchedScanTime(int csphBin, long elapsedRealtimeUs, int which)
public abstract int getWifiBatchedScanCount(int csphBin, int which)
public abstract long getWifiMulticastTime(long elapsedRealtimeUs, int which)
public abstract BatteryStats.Timer getAudioTurnedOnTimer()
public abstract BatteryStats.Timer getVideoTurnedOnTimer()
public abstract BatteryStats.Timer getFlashlightTurnedOnTimer()
public abstract BatteryStats.Timer getCameraTurnedOnTimer()
public abstract BatteryStats.Timer getForegroundActivityTimer()
public abstract BatteryStats.Timer getBluetoothScanTimer()
public abstract long getProcessStateTime(int state, long elapsedRealtimeUs, int which)
public abstract BatteryStats.Timer getProcessStateTimer(int state)
public abstract BatteryStats.Timer getVibratorOnTimer()
public abstract void noteUserActivityLocked(int type)
public abstract boolean hasUserActivity()
public abstract int getUserActivityCount(int type, int which)
public abstract boolean hasNetworkActivity()
public abstract long getNetworkActivityBytes(int type, int which)
public abstract long getNetworkActivityPackets(int type, int which)
public abstract long getMobileRadioActiveTime(int which)
public abstract int getMobileRadioActiveCount(int which)
public abstract long getUserCpuTimeUs(int which)
public abstract long getSystemCpuTimeUs(int which)
public abstract long getCpuPowerMaUs(int which)
public abstract long getTimeAtCpuSpeed(int cluster, int step, int which)
cluster
- the index of the CPU cluster.step
- the index of the CPU speed. This is not the actual speed of the CPU.which
- one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.PowerProfile.getNumCpuClusters()
,
PowerProfile.getNumSpeedStepsInCpuCluster(int)
public abstract long getMobileRadioApWakeupCount(int which)
which
- one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.public abstract long getWifiRadioApWakeupCount(int which)
which
- one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.