public abstract class BatteryStats extends Object implements Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
BatteryStats.BitDescription |
static class |
BatteryStats.ControllerActivityCounter
Container class that aggregates counters for transmit, receive, and idle state of a
radio controller.
|
static class |
BatteryStats.Counter
State for keeping track of counting information.
|
static class |
BatteryStats.DailyItem |
static class |
BatteryStats.HistoryEventTracker |
static class |
BatteryStats.HistoryItem |
static class |
BatteryStats.HistoryPrinter |
static class |
BatteryStats.HistoryStepDetails
Optional detailed information that can go into a history step.
|
static class |
BatteryStats.HistoryTag |
static class |
BatteryStats.LevelStepTracker |
static class |
BatteryStats.LongCounter
State for keeping track of long counting information.
|
static class |
BatteryStats.PackageChange |
static class |
BatteryStats.Timer
State for keeping track of timing information.
|
static class |
BatteryStats.Uid
The statistics associated with a particular uid.
|
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static int |
AUDIO_TURNED_ON
A constant indicating an audio turn on timer
|
static int |
BLUETOOTH_SCAN_ON
A constant indicating a bluetooth scan timer.
|
static int |
CAMERA_TURNED_ON
A constant indicating a camera turn on timer
|
static int |
DATA_CONNECTION_1xRTT |
static int |
DATA_CONNECTION_CDMA |
static int |
DATA_CONNECTION_EDGE |
static int |
DATA_CONNECTION_EHRPD |
static int |
DATA_CONNECTION_EVDO_0 |
static int |
DATA_CONNECTION_EVDO_A |
static int |
DATA_CONNECTION_EVDO_B |
static int |
DATA_CONNECTION_GPRS |
static int |
DATA_CONNECTION_HSDPA |
static int |
DATA_CONNECTION_HSPA |
static int |
DATA_CONNECTION_HSPAP |
static int |
DATA_CONNECTION_HSUPA |
static int |
DATA_CONNECTION_IDEN |
static int |
DATA_CONNECTION_LTE |
static int |
DATA_CONNECTION_NONE |
static int |
DATA_CONNECTION_OTHER |
static int |
DATA_CONNECTION_UMTS |
static int |
DEVICE_IDLE_MODE_DEEP
Constant for device idle mode: active in full mode.
|
static int |
DEVICE_IDLE_MODE_LIGHT
Constant for device idle mode: active in lightweight mode.
|
static int |
DEVICE_IDLE_MODE_OFF
Constant for device idle mode: not active.
|
static int |
DUMP_CHARGED_ONLY |
static int |
DUMP_DAILY_ONLY |
static int |
DUMP_DEVICE_WIFI_ONLY |
static int |
DUMP_HISTORY_ONLY |
static int |
DUMP_INCLUDE_HISTORY |
static int |
DUMP_VERBOSE |
static int |
FLASHLIGHT_TURNED_ON
A constant indicating a flashlight turn on timer
|
static int |
FOREGROUND_ACTIVITY
A constant indicating a foreground activity timer
|
static int |
FULL_WIFI_LOCK
A constant indicating a full wifi lock timer
|
static String[] |
HISTORY_EVENT_CHECKIN_NAMES |
static String[] |
HISTORY_EVENT_NAMES |
static BatteryStats.BitDescription[] |
HISTORY_STATE_DESCRIPTIONS |
static BatteryStats.BitDescription[] |
HISTORY_STATE2_DESCRIPTIONS |
static int |
JOB
A constant indicating a job timer
|
static int |
NETWORK_BT_RX_DATA |
static int |
NETWORK_BT_TX_DATA |
static int |
NETWORK_MOBILE_RX_DATA |
static int |
NETWORK_MOBILE_TX_DATA |
static int |
NETWORK_WIFI_RX_DATA |
static int |
NETWORK_WIFI_TX_DATA |
static int |
NUM_DATA_CONNECTION_TYPES |
static int |
NUM_NETWORK_ACTIVITY_TYPES |
static int |
NUM_SCREEN_BRIGHTNESS_BINS |
static int |
NUM_WIFI_SIGNAL_STRENGTH_BINS |
static int |
NUM_WIFI_STATES |
static int |
NUM_WIFI_SUPPL_STATES |
static int |
PROCESS_STATE
A constant indicating a process state timer
|
static String |
RESULT_RECEIVER_CONTROLLER_KEY |
static int |
SCREEN_BRIGHTNESS_BRIGHT |
static int |
SCREEN_BRIGHTNESS_DARK |
static int |
SCREEN_BRIGHTNESS_DIM |
static int |
SCREEN_BRIGHTNESS_LIGHT |
static int |
SCREEN_BRIGHTNESS_MEDIUM |
static int |
SENSOR
A constant indicating a sensor timer.
|
static String |
SERVICE_NAME |
static int |
STATS_CURRENT
Include only the current run in the stats.
|
static int |
STATS_SINCE_CHARGED
Include all of the data in the stats, including previously saved data.
|
static int |
STATS_SINCE_UNPLUGGED
Include only the run since the last time the device was unplugged in the stats.
|
static long |
STEP_LEVEL_INITIAL_MODE_MASK |
static int |
STEP_LEVEL_INITIAL_MODE_SHIFT |
static long |
STEP_LEVEL_LEVEL_MASK |
static int |
STEP_LEVEL_LEVEL_SHIFT |
static int |
STEP_LEVEL_MODE_DEVICE_IDLE |
static String[] |
STEP_LEVEL_MODE_LABELS |
static int |
STEP_LEVEL_MODE_POWER_SAVE |
static int |
STEP_LEVEL_MODE_SCREEN_STATE |
static int[] |
STEP_LEVEL_MODE_VALUES |
static int[] |
STEP_LEVEL_MODES_OF_INTEREST |
static long |
STEP_LEVEL_MODIFIED_MODE_MASK |
static int |
STEP_LEVEL_MODIFIED_MODE_SHIFT |
static long |
STEP_LEVEL_TIME_MASK |
static int |
SYNC
A constant indicating a sync timer
|
static int |
VIBRATOR_ON
A constant indicating a vibrator on timer
|
static int |
VIDEO_TURNED_ON
A constant indicating a video turn on timer
|
static int |
WAKE_TYPE_DRAW
A constant indicating a draw wake lock timer.
|
static int |
WAKE_TYPE_FULL
A constant indicating a full wake lock timer.
|
static int |
WAKE_TYPE_PARTIAL
A constant indicating a partial wake lock timer.
|
static int |
WAKE_TYPE_WINDOW
A constant indicating a window wake lock timer.
|
static int |
WIFI_BATCHED_SCAN
A constant indicating a wifi batched scan is active
|
static int |
WIFI_MULTICAST_ENABLED
A constant indicating a wifi multicast timer
|
static int |
WIFI_RUNNING
A constant indicating a a wifi running timer
|
static int |
WIFI_SCAN
A constant indicating a wifi scan
|
static int |
WIFI_STATE_OFF |
static int |
WIFI_STATE_OFF_SCANNING |
static int |
WIFI_STATE_ON_CONNECTED_P2P |
static int |
WIFI_STATE_ON_CONNECTED_STA |
static int |
WIFI_STATE_ON_CONNECTED_STA_P2P |
static int |
WIFI_STATE_ON_DISCONNECTED |
static int |
WIFI_STATE_ON_NO_NETWORKS |
static int |
WIFI_STATE_SOFT_AP |
static int |
WIFI_SUPPL_STATE_ASSOCIATED |
static int |
WIFI_SUPPL_STATE_ASSOCIATING |
static int |
WIFI_SUPPL_STATE_AUTHENTICATING |
static int |
WIFI_SUPPL_STATE_COMPLETED |
static int |
WIFI_SUPPL_STATE_DISCONNECTED |
static int |
WIFI_SUPPL_STATE_DORMANT |
static int |
WIFI_SUPPL_STATE_FOUR_WAY_HANDSHAKE |
static int |
WIFI_SUPPL_STATE_GROUP_HANDSHAKE |
static int |
WIFI_SUPPL_STATE_INACTIVE |
static int |
WIFI_SUPPL_STATE_INTERFACE_DISABLED |
static int |
WIFI_SUPPL_STATE_INVALID |
static int |
WIFI_SUPPL_STATE_SCANNING |
static int |
WIFI_SUPPL_STATE_UNINITIALIZED |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
BatteryStats() |
Modifier and Type | Method and Description |
---|---|
abstract void |
commitCurrentHistoryBatchLocked()
Don't allow any more batching in to the current history event.
|
abstract long |
computeBatteryRealtime(long curTime,
int which)
Returns the total, last, or current battery realtime in microseconds.
|
abstract long |
computeBatteryScreenOffRealtime(long curTime,
int which)
Returns the total, last, or current battery screen off realtime in microseconds.
|
abstract long |
computeBatteryScreenOffUptime(long curTime,
int which)
Returns the total, last, or current battery screen off uptime in microseconds.
|
abstract long |
computeBatteryTimeRemaining(long curTime)
Compute an approximation for how much run time (in microseconds) is remaining on
the battery.
|
abstract long |
computeBatteryUptime(long curTime,
int which)
Returns the total, last, or current battery uptime in microseconds.
|
abstract long |
computeChargeTimeRemaining(long curTime)
Compute an approximation for how much time (in microseconds) remains until the battery
is fully charged.
|
abstract long |
computeRealtime(long curTime,
int which)
Returns the total, last, or current realtime in microseconds.
|
abstract long |
computeUptime(long curTime,
int which)
Returns the total, last, or current uptime in microseconds.
|
void |
dumpCheckinLocked(Context context,
PrintWriter pw,
int which,
int reqUid)
Temporary for settings.
|
void |
dumpCheckinLocked(Context context,
PrintWriter pw,
int which,
int reqUid,
boolean wifiOnly)
Checkin server version of dump to produce more compact, computer-readable log.
|
void |
dumpCheckinLocked(Context context,
PrintWriter pw,
List<ApplicationInfo> apps,
int flags,
long histStart) |
void |
dumpLocked(Context context,
PrintWriter pw,
int flags,
int reqUid,
long histStart)
Dumps a human-readable summary of the battery statistics to the given PrintWriter.
|
void |
dumpLocked(Context context,
PrintWriter pw,
String prefix,
int which,
int reqUid)
Temporary for settings.
|
void |
dumpLocked(Context context,
PrintWriter pw,
String prefix,
int which,
int reqUid,
boolean wifiOnly) |
abstract void |
finishIteratingHistoryLocked() |
abstract void |
finishIteratingOldHistoryLocked() |
String |
formatRatioLocked(long num,
long den) |
static void |
formatTimeMs(StringBuilder sb,
long time) |
static void |
formatTimeMsNoSpace(StringBuilder sb,
long time) |
abstract long |
getBatteryRealtime(long curTime)
Returns the current battery realtime in microseconds.
|
abstract long |
getBatteryUptime(long curTime)
Returns the current battery uptime in microseconds.
|
abstract BatteryStats.ControllerActivityCounter |
getBluetoothControllerActivity()
Returns a
BatteryStats.ControllerActivityCounter which is an aggregate of the times spent
in various radio controller states, such as transmit, receive, and idle. |
abstract long |
getBluetoothScanTime(long elapsedRealtimeUs,
int which)
Returns the time in microseconds that bluetooth scans were running while the device was
on battery.
|
abstract long |
getCameraOnTime(long elapsedRealtimeUs,
int which)
Returns the time in microseconds that the camera has been on while the device was
running on battery.
|
abstract BatteryStats.LevelStepTracker |
getChargeLevelStepTracker()
Return the array of charge step durations.
|
abstract long |
getCurrentDailyStartTime() |
abstract BatteryStats.LevelStepTracker |
getDailyChargeLevelStepTracker()
Return the array of daily charge step durations.
|
abstract BatteryStats.LevelStepTracker |
getDailyDischargeLevelStepTracker()
Return the array of daily discharge step durations.
|
abstract BatteryStats.DailyItem |
getDailyItemLocked(int daysAgo) |
abstract ArrayList<BatteryStats.PackageChange> |
getDailyPackageChanges() |
abstract int |
getDeviceIdleModeCount(int mode,
int which)
Returns the number of times that the devie has gone in to idle mode.
|
abstract long |
getDeviceIdleModeTime(int mode,
long elapsedRealtimeUs,
int which)
Returns the time in microseconds that device has been in idle mode while
running on battery.
|
abstract int |
getDeviceIdlingCount(int mode,
int which)
Returns the number of times that the devie has started idling.
|
abstract long |
getDeviceIdlingTime(int mode,
long elapsedRealtimeUs,
int which)
Returns the time in microseconds that device has been in idling while on
battery.
|
abstract int |
getDischargeAmount(int which)
Retrieve the discharge amount over the selected discharge period which.
|
abstract int |
getDischargeAmountScreenOff()
Get the amount the battery has discharged while the screen was off,
since the last time power was unplugged.
|
abstract int |
getDischargeAmountScreenOffSinceCharge()
Get the amount the battery has discharged while the screen was off,
since the last time the device was charged.
|
abstract int |
getDischargeAmountScreenOn()
Get the amount the battery has discharged while the screen was on,
since the last time power was unplugged.
|
abstract int |
getDischargeAmountScreenOnSinceCharge()
Get the amount the battery has discharged while the screen was on,
since the last time the device was charged.
|
abstract BatteryStats.LongCounter |
getDischargeCoulombCounter()
Return the counter keeping track of the amount of battery discharge measured in
micro-Ampere-hours.
|
abstract int |
getDischargeCurrentLevel()
Returns the current battery percentage level if we are in a discharge cycle, otherwise
returns the level at the last plug event.
|
abstract BatteryStats.LevelStepTracker |
getDischargeLevelStepTracker()
Return the array of discharge step durations.
|
abstract BatteryStats.LongCounter |
getDischargeScreenOffCoulombCounter()
Return the counter keeping track of the amount of battery discharge while the screen was off,
measured in micro-Ampere-hours.
|
abstract int |
getDischargeStartLevel()
Returns the battery percentage level at the last time the device was unplugged from power, or
the last time it booted on battery power.
|
abstract String |
getEndPlatformVersion()
Return platform version tag that we were running in when the battery stats ended.
|
abstract int |
getEstimatedBatteryCapacity()
Returns the estimated real battery capacity, which may be less than the capacity
declared by the PowerProfile.
|
abstract long |
getFlashlightOnCount(int which)
Returns the number of times that the flashlight has been turned on while the device was
running on battery.
|
abstract long |
getFlashlightOnTime(long elapsedRealtimeUs,
int which)
Returns the time in microseconds that the flashlight has been on while the device was
running on battery.
|
abstract long |
getGlobalWifiRunningTime(long elapsedRealtimeUs,
int which)
Returns the time in microseconds that wifi has been on and the driver has
been in the running state while the device was running on battery.
|
abstract int |
getHighDischargeAmountSinceCharge()
Get the amount the battery has discharged since the stats were
last reset after charging, as an upper-end approximation.
|
abstract long |
getHistoryBaseTime()
Return the base time offset for the battery history.
|
abstract int |
getHistoryStringPoolBytes() |
abstract int |
getHistoryStringPoolSize() |
abstract String |
getHistoryTagPoolString(int index) |
abstract int |
getHistoryTagPoolUid(int index) |
abstract int |
getHistoryTotalSize() |
abstract int |
getHistoryUsedSize() |
abstract long |
getInteractiveTime(long elapsedRealtimeUs,
int which) |
abstract boolean |
getIsOnBattery()
Return whether we are currently running on battery.
|
abstract Map<String,? extends BatteryStats.Timer> |
getKernelWakelockStats() |
abstract long |
getLongestDeviceIdleModeTime(int mode)
Return the longest duration we spent in a particular device idle mode (fully in the
mode, not in idle maintenance etc).
|
abstract int |
getLowDischargeAmountSinceCharge()
Get the amount the battery has discharged since the stats were
last reset after charging, as a lower-end approximation.
|
abstract long |
getMobileRadioActiveAdjustedTime(int which)
Returns the time in microseconds that is the difference between the mobile radio
time we saw based on the elapsed timestamp when going down vs. the given time stamp
from the radio.
|
abstract int |
getMobileRadioActiveCount(int which)
Returns the number of times that the mobile network has transitioned to the
active state.
|
abstract long |
getMobileRadioActiveTime(long elapsedRealtimeUs,
int which)
Returns the time in microseconds that the mobile network has been active
(in a high power state).
|
abstract int |
getMobileRadioActiveUnknownCount(int which)
Return count of number of times radio was up that could not be blamed on apps.
|
abstract long |
getMobileRadioActiveUnknownTime(int which)
Returns the time in microseconds that the mobile network has been active
(in a high power state) but not being able to blame on an app.
|
abstract BatteryStats.ControllerActivityCounter |
getModemControllerActivity()
Returns a
BatteryStats.ControllerActivityCounter which is an aggregate of the times spent
in various radio controller states, such as transmit, receive, and idle. |
abstract long |
getNetworkActivityBytes(int type,
int which) |
abstract long |
getNetworkActivityPackets(int type,
int which) |
abstract boolean |
getNextHistoryLocked(BatteryStats.HistoryItem out) |
abstract long |
getNextMaxDailyDeadline() |
abstract long |
getNextMinDailyDeadline() |
abstract boolean |
getNextOldHistoryLocked(BatteryStats.HistoryItem out) |
abstract int |
getNumConnectivityChange(int which)
Returns the number of times that connectivity state changed.
|
abstract int |
getParcelVersion()
Return the internal version code of the parcelled format.
|
abstract int |
getPhoneDataConnectionCount(int dataType,
int which)
Returns the number of times the phone has entered the given data
connection type.
|
abstract long |
getPhoneDataConnectionTime(int dataType,
long elapsedRealtimeUs,
int which)
Returns the time in microseconds that the phone has been running with
the given data connection.
|
abstract int |
getPhoneOnCount(int which)
Returns the number of times a phone call was activated.
|
abstract long |
getPhoneOnTime(long elapsedRealtimeUs,
int which)
Returns the time in microseconds that the phone has been on while the device was
running on battery.
|
abstract long |
getPhoneSignalScanningTime(long elapsedRealtimeUs,
int which)
Returns the time in microseconds that the phone has been trying to
acquire a signal.
|
abstract int |
getPhoneSignalStrengthCount(int strengthBin,
int which)
Returns the number of times the phone has entered the given signal strength.
|
abstract long |
getPhoneSignalStrengthTime(int strengthBin,
long elapsedRealtimeUs,
int which)
Returns the time in microseconds that the phone has been running with
the given signal strength.
|
abstract int |
getPowerSaveModeEnabledCount(int which)
Returns the number of times that power save mode was enabled.
|
abstract long |
getPowerSaveModeEnabledTime(long elapsedRealtimeUs,
int which)
Returns the time in microseconds that power save mode has been enabled while the device was
running on battery.
|
abstract long |
getScreenBrightnessTime(int brightnessBin,
long elapsedRealtimeUs,
int which)
Returns the time in microseconds that the screen has been on with
the given brightness
|
abstract int |
getScreenOnCount(int which)
Returns the number of times the screen was turned on.
|
abstract long |
getScreenOnTime(long elapsedRealtimeUs,
int which)
Returns the time in microseconds that the screen has been on while the device was
running on battery.
|
abstract long |
getStartClockTime()
Return the wall clock time when battery stats data collection started.
|
abstract int |
getStartCount()
Returns the number of times the device has been started.
|
abstract String |
getStartPlatformVersion()
Return platform version tag that we were running in when the battery stats started.
|
abstract SparseArray<? extends BatteryStats.Uid> |
getUidStats()
Returns a SparseArray containing the statistics for each uid.
|
abstract Map<String,? extends BatteryStats.Timer> |
getWakeupReasonStats() |
abstract BatteryStats.ControllerActivityCounter |
getWifiControllerActivity()
Returns a
BatteryStats.ControllerActivityCounter which is an aggregate of the times spent
in various radio controller states, such as transmit, receive, and idle. |
abstract long |
getWifiOnTime(long elapsedRealtimeUs,
int which)
Returns the time in microseconds that wifi has been on while the device was
running on battery.
|
abstract int |
getWifiSignalStrengthCount(int strengthBin,
int which)
Returns the number of times WIFI has entered the given signal strength.
|
abstract long |
getWifiSignalStrengthTime(int strengthBin,
long elapsedRealtimeUs,
int which)
Returns the time in microseconds that WIFI has been running with
the given signal strength.
|
abstract int |
getWifiStateCount(int wifiState,
int which)
Returns the number of times that WiFi has entered the given state.
|
abstract long |
getWifiStateTime(int wifiState,
long elapsedRealtimeUs,
int which)
Returns the time in microseconds that WiFi has been running in the given state.
|
abstract int |
getWifiSupplStateCount(int state,
int which)
Returns the number of times that the wifi supplicant has transitioned
to a given state.
|
abstract long |
getWifiSupplStateTime(int state,
long elapsedRealtimeUs,
int which)
Returns the time in microseconds that the wifi supplicant has been
in a given state.
|
abstract boolean |
hasBluetoothActivityReporting()
Returns true if the BatteryStats object has detailed bluetooth power reports.
|
abstract boolean |
hasModemActivityReporting()
Returns true if the BatteryStats object has detailed modem power reports.
|
abstract boolean |
hasWifiActivityReporting()
Returns true if the BatteryStats object has detailed WiFi power reports.
|
void |
prepareForDumpLocked() |
abstract boolean |
startIteratingHistoryLocked() |
abstract boolean |
startIteratingOldHistoryLocked() |
abstract void |
writeToParcelWithoutUids(Parcel out,
int flags) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
describeContents, writeToParcel
public static final String SERVICE_NAME
public static final int WAKE_TYPE_PARTIAL
public static final int WAKE_TYPE_FULL
public static final int WAKE_TYPE_WINDOW
public static final int SENSOR
public static final int WIFI_RUNNING
public static final int FULL_WIFI_LOCK
public static final int WIFI_SCAN
public static final int WIFI_MULTICAST_ENABLED
public static final int VIDEO_TURNED_ON
public static final int VIBRATOR_ON
public static final int FOREGROUND_ACTIVITY
public static final int WIFI_BATCHED_SCAN
public static final int PROCESS_STATE
public static final int SYNC
public static final int JOB
public static final int AUDIO_TURNED_ON
public static final int FLASHLIGHT_TURNED_ON
public static final int CAMERA_TURNED_ON
public static final int WAKE_TYPE_DRAW
public static final int BLUETOOTH_SCAN_ON
public static final int STATS_SINCE_CHARGED
public static final int STATS_CURRENT
public static final int STATS_SINCE_UNPLUGGED
public static final String RESULT_RECEIVER_CONTROLLER_KEY
public static final int SCREEN_BRIGHTNESS_DARK
public static final int SCREEN_BRIGHTNESS_DIM
public static final int SCREEN_BRIGHTNESS_MEDIUM
public static final int SCREEN_BRIGHTNESS_LIGHT
public static final int SCREEN_BRIGHTNESS_BRIGHT
public static final int NUM_SCREEN_BRIGHTNESS_BINS
public static final int DEVICE_IDLE_MODE_OFF
public static final int DEVICE_IDLE_MODE_LIGHT
public static final int DEVICE_IDLE_MODE_DEEP
public static final int DATA_CONNECTION_NONE
public static final int DATA_CONNECTION_GPRS
public static final int DATA_CONNECTION_EDGE
public static final int DATA_CONNECTION_UMTS
public static final int DATA_CONNECTION_CDMA
public static final int DATA_CONNECTION_EVDO_0
public static final int DATA_CONNECTION_EVDO_A
public static final int DATA_CONNECTION_1xRTT
public static final int DATA_CONNECTION_HSDPA
public static final int DATA_CONNECTION_HSUPA
public static final int DATA_CONNECTION_HSPA
public static final int DATA_CONNECTION_IDEN
public static final int DATA_CONNECTION_EVDO_B
public static final int DATA_CONNECTION_LTE
public static final int DATA_CONNECTION_EHRPD
public static final int DATA_CONNECTION_HSPAP
public static final int DATA_CONNECTION_OTHER
public static final int NUM_DATA_CONNECTION_TYPES
public static final int WIFI_SUPPL_STATE_INVALID
public static final int WIFI_SUPPL_STATE_DISCONNECTED
public static final int WIFI_SUPPL_STATE_INTERFACE_DISABLED
public static final int WIFI_SUPPL_STATE_INACTIVE
public static final int WIFI_SUPPL_STATE_SCANNING
public static final int WIFI_SUPPL_STATE_AUTHENTICATING
public static final int WIFI_SUPPL_STATE_ASSOCIATING
public static final int WIFI_SUPPL_STATE_ASSOCIATED
public static final int WIFI_SUPPL_STATE_FOUR_WAY_HANDSHAKE
public static final int WIFI_SUPPL_STATE_GROUP_HANDSHAKE
public static final int WIFI_SUPPL_STATE_COMPLETED
public static final int WIFI_SUPPL_STATE_DORMANT
public static final int WIFI_SUPPL_STATE_UNINITIALIZED
public static final int NUM_WIFI_SUPPL_STATES
public static final BatteryStats.BitDescription[] HISTORY_STATE_DESCRIPTIONS
public static final BatteryStats.BitDescription[] HISTORY_STATE2_DESCRIPTIONS
public static final String[] HISTORY_EVENT_NAMES
public static final String[] HISTORY_EVENT_CHECKIN_NAMES
public static final int WIFI_STATE_OFF
public static final int WIFI_STATE_OFF_SCANNING
public static final int WIFI_STATE_ON_NO_NETWORKS
public static final int WIFI_STATE_ON_DISCONNECTED
public static final int WIFI_STATE_ON_CONNECTED_STA
public static final int WIFI_STATE_ON_CONNECTED_P2P
public static final int WIFI_STATE_ON_CONNECTED_STA_P2P
public static final int WIFI_STATE_SOFT_AP
public static final int NUM_WIFI_STATES
public static final int NUM_WIFI_SIGNAL_STRENGTH_BINS
public static final int NETWORK_MOBILE_RX_DATA
public static final int NETWORK_MOBILE_TX_DATA
public static final int NETWORK_WIFI_RX_DATA
public static final int NETWORK_WIFI_TX_DATA
public static final int NETWORK_BT_RX_DATA
public static final int NETWORK_BT_TX_DATA
public static final int NUM_NETWORK_ACTIVITY_TYPES
public static final long STEP_LEVEL_TIME_MASK
public static final long STEP_LEVEL_LEVEL_MASK
public static final int STEP_LEVEL_LEVEL_SHIFT
public static final long STEP_LEVEL_INITIAL_MODE_MASK
public static final int STEP_LEVEL_INITIAL_MODE_SHIFT
public static final long STEP_LEVEL_MODIFIED_MODE_MASK
public static final int STEP_LEVEL_MODIFIED_MODE_SHIFT
public static final int STEP_LEVEL_MODE_SCREEN_STATE
public static final int STEP_LEVEL_MODE_POWER_SAVE
public static final int STEP_LEVEL_MODE_DEVICE_IDLE
public static final int[] STEP_LEVEL_MODES_OF_INTEREST
public static final int[] STEP_LEVEL_MODE_VALUES
public static final String[] STEP_LEVEL_MODE_LABELS
public static final int DUMP_CHARGED_ONLY
public static final int DUMP_DAILY_ONLY
public static final int DUMP_HISTORY_ONLY
public static final int DUMP_INCLUDE_HISTORY
public static final int DUMP_VERBOSE
public static final int DUMP_DEVICE_WIFI_ONLY
public abstract BatteryStats.DailyItem getDailyItemLocked(int daysAgo)
public abstract long getCurrentDailyStartTime()
public abstract long getNextMinDailyDeadline()
public abstract long getNextMaxDailyDeadline()
public abstract void commitCurrentHistoryBatchLocked()
public abstract int getHistoryTotalSize()
public abstract int getHistoryUsedSize()
public abstract boolean startIteratingHistoryLocked()
public abstract int getHistoryStringPoolSize()
public abstract int getHistoryStringPoolBytes()
public abstract String getHistoryTagPoolString(int index)
public abstract int getHistoryTagPoolUid(int index)
public abstract boolean getNextHistoryLocked(BatteryStats.HistoryItem out)
public abstract void finishIteratingHistoryLocked()
public abstract boolean startIteratingOldHistoryLocked()
public abstract boolean getNextOldHistoryLocked(BatteryStats.HistoryItem out)
public abstract void finishIteratingOldHistoryLocked()
public abstract long getHistoryBaseTime()
public abstract int getStartCount()
public abstract long getScreenOnTime(long elapsedRealtimeUs, int which)
public abstract int getScreenOnCount(int which)
public abstract long getInteractiveTime(long elapsedRealtimeUs, int which)
public abstract long getScreenBrightnessTime(int brightnessBin, long elapsedRealtimeUs, int which)
public abstract long getPowerSaveModeEnabledTime(long elapsedRealtimeUs, int which)
public abstract int getPowerSaveModeEnabledCount(int which)
public abstract long getDeviceIdleModeTime(int mode, long elapsedRealtimeUs, int which)
public abstract int getDeviceIdleModeCount(int mode, int which)
public abstract long getLongestDeviceIdleModeTime(int mode)
public abstract long getDeviceIdlingTime(int mode, long elapsedRealtimeUs, int which)
getDeviceIdleModeTime(int, long, int)
-- it
counts all of the time that we consider the device to be idle, whether or not
it is currently in the actual device idle mode.
public abstract int getDeviceIdlingCount(int mode, int which)
public abstract int getNumConnectivityChange(int which)
public abstract long getPhoneOnTime(long elapsedRealtimeUs, int which)
public abstract int getPhoneOnCount(int which)
public abstract long getPhoneSignalStrengthTime(int strengthBin, long elapsedRealtimeUs, int which)
public abstract long getPhoneSignalScanningTime(long elapsedRealtimeUs, int which)
public abstract int getPhoneSignalStrengthCount(int strengthBin, int which)
public abstract long getMobileRadioActiveTime(long elapsedRealtimeUs, int which)
public abstract int getMobileRadioActiveCount(int which)
public abstract long getMobileRadioActiveAdjustedTime(int which)
public abstract long getMobileRadioActiveUnknownTime(int which)
public abstract int getMobileRadioActiveUnknownCount(int which)
public abstract long getPhoneDataConnectionTime(int dataType, long elapsedRealtimeUs, int which)
public abstract int getPhoneDataConnectionCount(int dataType, int which)
public abstract long getWifiOnTime(long elapsedRealtimeUs, int which)
public abstract long getGlobalWifiRunningTime(long elapsedRealtimeUs, int which)
public abstract long getWifiStateTime(int wifiState, long elapsedRealtimeUs, int which)
public abstract int getWifiStateCount(int wifiState, int which)
public abstract long getWifiSupplStateTime(int state, long elapsedRealtimeUs, int which)
public abstract int getWifiSupplStateCount(int state, int which)
public abstract long getWifiSignalStrengthTime(int strengthBin, long elapsedRealtimeUs, int which)
public abstract int getWifiSignalStrengthCount(int strengthBin, int which)
public abstract long getFlashlightOnTime(long elapsedRealtimeUs, int which)
public abstract long getFlashlightOnCount(int which)
public abstract long getCameraOnTime(long elapsedRealtimeUs, int which)
public abstract long getBluetoothScanTime(long elapsedRealtimeUs, int which)
public abstract long getNetworkActivityBytes(int type, int which)
public abstract long getNetworkActivityPackets(int type, int which)
public abstract boolean hasWifiActivityReporting()
getWifiControllerActivity()
will yield the
actual power data.public abstract BatteryStats.ControllerActivityCounter getWifiControllerActivity()
BatteryStats.ControllerActivityCounter
which is an aggregate of the times spent
in various radio controller states, such as transmit, receive, and idle.BatteryStats.ControllerActivityCounter
public abstract boolean hasBluetoothActivityReporting()
getBluetoothControllerActivity()
will yield the
actual power data.public abstract BatteryStats.ControllerActivityCounter getBluetoothControllerActivity()
BatteryStats.ControllerActivityCounter
which is an aggregate of the times spent
in various radio controller states, such as transmit, receive, and idle.BatteryStats.ControllerActivityCounter
public abstract boolean hasModemActivityReporting()
getModemControllerActivity()
will yield the
actual power data.public abstract BatteryStats.ControllerActivityCounter getModemControllerActivity()
BatteryStats.ControllerActivityCounter
which is an aggregate of the times spent
in various radio controller states, such as transmit, receive, and idle.BatteryStats.ControllerActivityCounter
public abstract long getStartClockTime()
public abstract String getStartPlatformVersion()
public abstract String getEndPlatformVersion()
public abstract int getParcelVersion()
public abstract boolean getIsOnBattery()
public abstract SparseArray<? extends BatteryStats.Uid> getUidStats()
public abstract long getBatteryUptime(long curTime)
curTime
- the amount of elapsed realtime in microseconds.public abstract long getBatteryRealtime(long curTime)
curTime
- the amount of elapsed realtime in microseconds.public abstract int getDischargeStartLevel()
public abstract int getDischargeCurrentLevel()
public abstract int getLowDischargeAmountSinceCharge()
public abstract int getHighDischargeAmountSinceCharge()
public abstract int getDischargeAmount(int which)
public abstract int getDischargeAmountScreenOn()
public abstract int getDischargeAmountScreenOnSinceCharge()
public abstract int getDischargeAmountScreenOff()
public abstract int getDischargeAmountScreenOffSinceCharge()
public abstract long computeBatteryUptime(long curTime, int which)
curTime
- the elapsed realtime in microseconds.which
- one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.public abstract long computeBatteryRealtime(long curTime, int which)
curTime
- the current elapsed realtime in microseconds.which
- one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.public abstract long computeBatteryScreenOffUptime(long curTime, int which)
curTime
- the elapsed realtime in microseconds.which
- one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.public abstract long computeBatteryScreenOffRealtime(long curTime, int which)
curTime
- the current elapsed realtime in microseconds.which
- one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.public abstract long computeUptime(long curTime, int which)
curTime
- the current elapsed realtime in microseconds.which
- one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.public abstract long computeRealtime(long curTime, int which)
curTime
- the current elapsed realtime in microseconds.which
- one of STATS_SINCE_CHARGED, STATS_SINCE_UNPLUGGED, or STATS_CURRENT.public abstract long computeBatteryTimeRemaining(long curTime)
curTime
- The current elepsed realtime in microseconds.public abstract BatteryStats.LongCounter getDischargeScreenOffCoulombCounter()
public abstract BatteryStats.LongCounter getDischargeCoulombCounter()
public abstract int getEstimatedBatteryCapacity()
public abstract BatteryStats.LevelStepTracker getDischargeLevelStepTracker()
public abstract BatteryStats.LevelStepTracker getDailyDischargeLevelStepTracker()
public abstract long computeChargeTimeRemaining(long curTime)
curTime
- The current elepsed realtime in microseconds.public abstract BatteryStats.LevelStepTracker getChargeLevelStepTracker()
public abstract BatteryStats.LevelStepTracker getDailyChargeLevelStepTracker()
public abstract ArrayList<BatteryStats.PackageChange> getDailyPackageChanges()
public abstract Map<String,? extends BatteryStats.Timer> getWakeupReasonStats()
public abstract Map<String,? extends BatteryStats.Timer> getKernelWakelockStats()
public abstract void writeToParcelWithoutUids(Parcel out, int flags)
public static final void formatTimeMs(StringBuilder sb, long time)
public static final void formatTimeMsNoSpace(StringBuilder sb, long time)
public final String formatRatioLocked(long num, long den)
public final void dumpCheckinLocked(Context context, PrintWriter pw, int which, int reqUid)
public final void dumpCheckinLocked(Context context, PrintWriter pw, int which, int reqUid, boolean wifiOnly)
public final void dumpLocked(Context context, PrintWriter pw, String prefix, int which, int reqUid)
public final void dumpLocked(Context context, PrintWriter pw, String prefix, int which, int reqUid, boolean wifiOnly)
public void prepareForDumpLocked()
public void dumpLocked(Context context, PrintWriter pw, int flags, int reqUid, long histStart)
pw
- a Printer to receive the dump output.public void dumpCheckinLocked(Context context, PrintWriter pw, List<ApplicationInfo> apps, int flags, long histStart)