public final class ServiceState extends Object
Modifier and Type | Field and Description |
---|---|
static int |
SERVICE_BOUND |
static int |
SERVICE_COUNT |
static int |
SERVICE_EXEC |
static int |
SERVICE_RUN |
static int |
SERVICE_STARTED |
Constructor and Description |
---|
ServiceState(ProcessStats processStats,
String pkg,
String name,
String processName,
ProcessState proc) |
Modifier and Type | Method and Description |
---|---|
void |
add(ServiceState other) |
void |
applyNewOwner(Object newOwner) |
void |
clearCurrentOwner(Object owner,
boolean silently) |
void |
commitStateTime(long now) |
void |
dumpStats(PrintWriter pw,
String prefix,
String prefixInner,
String headerPrefix,
long now,
long totalTime,
boolean dumpSummary,
boolean dumpAll) |
long |
dumpTime(PrintWriter pw,
String prefix,
int serviceType,
int curState,
long curStartTime,
long now) |
void |
dumpTimesCheckin(PrintWriter pw,
String pkgName,
int uid,
int vers,
String serviceName,
long now) |
long |
getDuration(int opType,
int curState,
long startTime,
int memFactor,
long now) |
String |
getName() |
String |
getPackage() |
ProcessState |
getProcess() |
String |
getProcessName() |
boolean |
isInUse() |
boolean |
isRestarting() |
boolean |
readFromParcel(Parcel in) |
void |
resetSafely(long now) |
void |
setBound(boolean bound,
int memFactor,
long now) |
void |
setExecuting(boolean executing,
int memFactor,
long now) |
void |
setMemFactor(int memFactor,
long now) |
void |
setProcess(ProcessState proc) |
void |
setRestarting(boolean restarting,
int memFactor,
long now) |
void |
setStarted(boolean started,
int memFactor,
long now) |
String |
toString()
Returns a string representation of the object.
|
void |
updateStartedState(int memFactor,
long now) |
void |
writeToParcel(Parcel out,
long now) |
public static final int SERVICE_RUN
public static final int SERVICE_STARTED
public static final int SERVICE_BOUND
public static final int SERVICE_EXEC
public static final int SERVICE_COUNT
public ServiceState(ProcessStats processStats, String pkg, String name, String processName, ProcessState proc)
public String getPackage()
public String getProcessName()
public String getName()
public ProcessState getProcess()
public void setProcess(ProcessState proc)
public void setMemFactor(int memFactor, long now)
public void applyNewOwner(Object newOwner)
public void clearCurrentOwner(Object owner, boolean silently)
public boolean isInUse()
public boolean isRestarting()
public void add(ServiceState other)
public void resetSafely(long now)
public void writeToParcel(Parcel out, long now)
public boolean readFromParcel(Parcel in)
public void commitStateTime(long now)
public void setStarted(boolean started, int memFactor, long now)
public void setRestarting(boolean restarting, int memFactor, long now)
public void updateStartedState(int memFactor, long now)
public void setBound(boolean bound, int memFactor, long now)
public void setExecuting(boolean executing, int memFactor, long now)
public long getDuration(int opType, int curState, long startTime, int memFactor, long now)
public void dumpStats(PrintWriter pw, String prefix, String prefixInner, String headerPrefix, long now, long totalTime, boolean dumpSummary, boolean dumpAll)
public long dumpTime(PrintWriter pw, String prefix, int serviceType, int curState, long curStartTime, long now)
public void dumpTimesCheckin(PrintWriter pw, String pkgName, int uid, int vers, String serviceName, long now)
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())