public static class ActivityManager.RunningAppProcessInfo extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<ActivityManager.RunningAppProcessInfo> |
CREATOR |
static int |
FLAG_CANT_SAVE_STATE
Constant for
flags : this is an app that is unable to
correctly save its state when going to the background,
so it can not be killed while in the background. |
static int |
FLAG_HAS_ACTIVITIES
Constant for
flags : this process is associated with a
persistent system app. |
static int |
FLAG_PERSISTENT
Constant for
flags : this process is associated with a
persistent system app. |
int |
flags
Flags of information.
|
int |
importance
The relative importance level that the system places on this
process.
|
static int |
IMPORTANCE_BACKGROUND
Constant for
importance : This process process contains
background code that is expendable. |
static int |
IMPORTANCE_CANT_SAVE_STATE
Constant for
importance : This process is running an
application that can not save its state, and thus can't be killed
while in the background. |
static int |
IMPORTANCE_EMPTY
Constant for
importance : This process is empty of any
actively running code. |
static int |
IMPORTANCE_FOREGROUND
Constant for
importance : This process is running the
foreground UI; that is, it is the thing currently at the top of the screen
that the user is interacting with. |
static int |
IMPORTANCE_FOREGROUND_SERVICE
Constant for
importance : This process is running a foreground
service, for example to perform music playback even while the user is
not immediately in the app. |
static int |
IMPORTANCE_GONE
Constant for
importance : This process does not exist. |
static int |
IMPORTANCE_PERCEPTIBLE
Constant for
importance : This process is not something the user
is directly aware of, but is otherwise perceptable to them to some degree. |
static int |
IMPORTANCE_SERVICE
Constant for
importance : This process is contains services
that should remain running. |
static int |
IMPORTANCE_TOP_SLEEPING
Constant for
importance : This process is running the foreground
UI, but the device is asleep so it is not visible to the user. |
static int |
IMPORTANCE_VISIBLE
Constant for
importance : This process is running something
that is actively visible to the user, though not in the immediate
foreground. |
int |
importanceReasonCode
The reason for
importance , if any. |
ComponentName |
importanceReasonComponent
For the specified values of
importanceReasonCode , this
is the name of the component that is being used in this process. |
int |
importanceReasonImportance
When
importanceReasonPid is non-0, this is the importance
of the other pid. |
int |
importanceReasonPid
For the specified values of
importanceReasonCode , this
is the process ID of the other process that is a client of this
process. |
int |
lastTrimLevel
Last memory trim level reported to the process: corresponds to
the values supplied to
ComponentCallbacks2.onTrimMemory(int) . |
int |
lru
An additional ordering within a particular
importance
category, providing finer-grained information about the relative
utility of processes within a category. |
int |
pid
The pid of this process; 0 if none
|
String[] |
pkgList
All packages that have been loaded into the process.
|
String |
processName
The name of the process that this object is associated with
|
int |
processState
Current process state, as per PROCESS_STATE_* constants.
|
static int |
REASON_PROVIDER_IN_USE
Constant for
importanceReasonCode : one of the application's
content providers is being used by another process. |
static int |
REASON_SERVICE_IN_USE
Constant for
importanceReasonCode : one of the application's
content providers is being used by another process. |
static int |
REASON_UNKNOWN
Constant for
importanceReasonCode : nothing special has
been specified for the reason for this level. |
int |
uid
The user id of this process.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
RunningAppProcessInfo() |
RunningAppProcessInfo(String pProcessName,
int pPid,
String[] pArr) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
static int |
procStateToImportance(int procState) |
void |
readFromParcel(Parcel source) |
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
public String processName
public int pid
public int uid
public String[] pkgList
public static final int FLAG_CANT_SAVE_STATE
flags
: this is an app that is unable to
correctly save its state when going to the background,
so it can not be killed while in the background.public static final int FLAG_PERSISTENT
flags
: this process is associated with a
persistent system app.public static final int FLAG_HAS_ACTIVITIES
flags
: this process is associated with a
persistent system app.public int flags
FLAG_CANT_SAVE_STATE
.public int lastTrimLevel
ComponentCallbacks2.onTrimMemory(int)
.public static final int IMPORTANCE_FOREGROUND
importance
: This process is running the
foreground UI; that is, it is the thing currently at the top of the screen
that the user is interacting with.public static final int IMPORTANCE_FOREGROUND_SERVICE
importance
: This process is running a foreground
service, for example to perform music playback even while the user is
not immediately in the app. This generally indicates that the process
is doing something the user actively cares about.public static final int IMPORTANCE_TOP_SLEEPING
importance
: This process is running the foreground
UI, but the device is asleep so it is not visible to the user. This means
the user is not really aware of the process, because they can not see or
interact with it, but it is quite important because it what they expect to
return to once unlocking the device.public static final int IMPORTANCE_VISIBLE
importance
: This process is running something
that is actively visible to the user, though not in the immediate
foreground. This may be running a window that is behind the current
foreground (so paused and with its state saved, not interacting with
the user, but visible to them to some degree); it may also be running
other services under the system's control that it inconsiders important.public static final int IMPORTANCE_PERCEPTIBLE
importance
: This process is not something the user
is directly aware of, but is otherwise perceptable to them to some degree.public static final int IMPORTANCE_CANT_SAVE_STATE
importance
: This process is running an
application that can not save its state, and thus can't be killed
while in the background.public static final int IMPORTANCE_SERVICE
importance
: This process is contains services
that should remain running. These are background services apps have
started, not something the user is aware of, so they may be killed by
the system relatively freely (though it is generally desired that they
stay running as long as they want to).public static final int IMPORTANCE_BACKGROUND
importance
: This process process contains
background code that is expendable.public static final int IMPORTANCE_EMPTY
importance
: This process is empty of any
actively running code.public static final int IMPORTANCE_GONE
importance
: This process does not exist.public int importance
IMPORTANCE_FOREGROUND
,
IMPORTANCE_VISIBLE
, IMPORTANCE_SERVICE
,
IMPORTANCE_BACKGROUND
, or IMPORTANCE_EMPTY
. These
constants are numbered so that "more important" values are always
smaller than "less important" values.public int lru
importance
category, providing finer-grained information about the relative
utility of processes within a category. This number means nothing
except that a smaller values are more recently used (and thus
more important). Currently an LRU value is only maintained for
the IMPORTANCE_BACKGROUND
category, though others may
be maintained in the future.public static final int REASON_UNKNOWN
importanceReasonCode
: nothing special has
been specified for the reason for this level.public static final int REASON_PROVIDER_IN_USE
importanceReasonCode
: one of the application's
content providers is being used by another process. The pid of
the client process is in importanceReasonPid
and the
target provider in this process is in
importanceReasonComponent
.public static final int REASON_SERVICE_IN_USE
importanceReasonCode
: one of the application's
content providers is being used by another process. The pid of
the client process is in importanceReasonPid
and the
target provider in this process is in
importanceReasonComponent
.public int importanceReasonCode
importance
, if any.public int importanceReasonPid
importanceReasonCode
, this
is the process ID of the other process that is a client of this
process. This will be 0 if no other process is using this one.public ComponentName importanceReasonComponent
importanceReasonCode
, this
is the name of the component that is being used in this process.public int importanceReasonImportance
importanceReasonPid
is non-0, this is the importance
of the other pid. @hidepublic int processState
public static final Parcelable.Creator<ActivityManager.RunningAppProcessInfo> CREATOR
public static int procStateToImportance(int procState)
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)