public static class BatteryStatsImpl.TimeBase extends Object
Modifier and Type | Field and Description |
---|---|
protected ArrayList<BatteryStatsImpl.TimeBaseObs> |
mObservers |
protected long |
mPastRealtime |
protected long |
mPastUptime |
protected long |
mRealtime |
protected long |
mRealtimeStart |
protected boolean |
mRunning |
protected long |
mUnpluggedRealtime |
protected long |
mUnpluggedUptime |
protected long |
mUptime |
protected long |
mUptimeStart |
Constructor and Description |
---|
TimeBase() |
Modifier and Type | Method and Description |
---|---|
void |
add(BatteryStatsImpl.TimeBaseObs observer) |
long |
computeRealtime(long curTime,
int which) |
long |
computeUptime(long curTime,
int which) |
void |
dump(PrintWriter pw,
String prefix) |
long |
getRealtime(long curTime) |
long |
getRealtimeStart() |
long |
getUptime(long curTime) |
long |
getUptimeStart() |
boolean |
hasObserver(BatteryStatsImpl.TimeBaseObs observer) |
void |
init(long uptime,
long realtime) |
boolean |
isRunning() |
void |
readFromParcel(Parcel in) |
void |
readSummaryFromParcel(Parcel in) |
void |
remove(BatteryStatsImpl.TimeBaseObs observer) |
void |
reset(long uptime,
long realtime) |
boolean |
setRunning(boolean running,
long uptime,
long realtime) |
void |
writeSummaryToParcel(Parcel out,
long uptime,
long realtime) |
void |
writeToParcel(Parcel out,
long uptime,
long realtime) |
protected final ArrayList<BatteryStatsImpl.TimeBaseObs> mObservers
protected long mUptime
protected long mRealtime
protected boolean mRunning
protected long mPastUptime
protected long mUptimeStart
protected long mPastRealtime
protected long mRealtimeStart
protected long mUnpluggedUptime
protected long mUnpluggedRealtime
public void dump(PrintWriter pw, String prefix)
public void add(BatteryStatsImpl.TimeBaseObs observer)
public void remove(BatteryStatsImpl.TimeBaseObs observer)
public boolean hasObserver(BatteryStatsImpl.TimeBaseObs observer)
public void init(long uptime, long realtime)
public void reset(long uptime, long realtime)
public long computeUptime(long curTime, int which)
public long computeRealtime(long curTime, int which)
public long getUptime(long curTime)
public long getRealtime(long curTime)
public long getUptimeStart()
public long getRealtimeStart()
public boolean isRunning()
public boolean setRunning(boolean running, long uptime, long realtime)
public void readSummaryFromParcel(Parcel in)
public void writeSummaryToParcel(Parcel out, long uptime, long realtime)
public void readFromParcel(Parcel in)
public void writeToParcel(Parcel out, long uptime, long realtime)