public static class ActivityManager.RunningServiceInfo extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
long |
activeSince
The time when the service was first made active, either by someone
starting or binding to it.
|
int |
clientCount
Number of clients connected to the service.
|
int |
clientLabel
For special services that are bound to by system code, this is
a string resource providing a user-visible label for who the
client is.
|
String |
clientPackage
For special services that are bound to by system code, this is
the package that holds the binding.
|
int |
crashCount
Number of times the service's process has crashed while the service
is running.
|
static Parcelable.Creator<ActivityManager.RunningServiceInfo> |
CREATOR |
static int |
FLAG_FOREGROUND
Bit for
flags : set if the service has asked to
run as a foreground process. |
static int |
FLAG_PERSISTENT_PROCESS
Bit for {@link #flags): set if the service is running in a
persistent process.
|
static int |
FLAG_STARTED
Bit for
flags : set if this service has been
explicitly started. |
static int |
FLAG_SYSTEM_PROCESS
Bit for {@link #flags): set if the service is running in a
core system process.
|
int |
flags
Running flags.
|
boolean |
foreground
Set to true if the service has asked to run as a foreground process.
|
long |
lastActivityTime
The time when there was last activity in the service (either
explicit requests to start it or clients binding to it).
|
int |
pid
If non-zero, this is the process the service is running in.
|
String |
process
The name of the process this service runs in.
|
long |
restarting
If non-zero, this service is not currently running, but scheduled to
restart at the given time.
|
ComponentName |
service
The service component.
|
boolean |
started
Set to true if this service has been explicitly started.
|
int |
uid
The UID that owns this service.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
RunningServiceInfo() |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
void |
readFromParcel(Parcel source) |
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
public ComponentName service
public int pid
public int uid
public String process
public boolean foreground
public long activeSince
SystemClock.elapsedRealtime()
.public boolean started
public int clientCount
public int crashCount
public long lastActivityTime
SystemClock.uptimeMillis()
.public long restarting
public static final int FLAG_STARTED
flags
: set if this service has been
explicitly started.public static final int FLAG_FOREGROUND
flags
: set if the service has asked to
run as a foreground process.public static final int FLAG_SYSTEM_PROCESS
public static final int FLAG_PERSISTENT_PROCESS
public int flags
public String clientPackage
public int clientLabel
public static final Parcelable.Creator<ActivityManager.RunningServiceInfo> CREATOR
public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel dest, int flags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public void readFromParcel(Parcel source)