public
static
class
ActivityManager.RunningAppProcessInfo
extends Object
implements
Parcelable
java.lang.Object | |
↳ | android.app.ActivityManager.RunningAppProcessInfo |
Information you can retrieve about a running process.
Constants | |
---|---|
int |
IMPORTANCE_BACKGROUND
Constant for |
int |
IMPORTANCE_EMPTY
Constant for |
int |
IMPORTANCE_FOREGROUND
Constant for |
int |
IMPORTANCE_FOREGROUND_SERVICE
Constant for |
int |
IMPORTANCE_GONE
Constant for |
int |
IMPORTANCE_PERCEPTIBLE
Constant for |
int |
IMPORTANCE_SERVICE
Constant for |
int |
IMPORTANCE_TOP_SLEEPING
Constant for |
int |
IMPORTANCE_VISIBLE
Constant for |
int |
REASON_PROVIDER_IN_USE
Constant for |
int |
REASON_SERVICE_IN_USE
Constant for |
int |
REASON_UNKNOWN
Constant for |
Inherited constants |
---|
From
interface
android.os.Parcelable
|
Fields | |
---|---|
public
static
final
Creator<ActivityManager.RunningAppProcessInfo> |
CREATOR
|
public
int |
importance
The relative importance level that the system places on this process. |
public
int |
importanceReasonCode
The reason for |
public
ComponentName |
importanceReasonComponent
For the specified values of |
public
int |
importanceReasonPid
For the specified values of |
public
int |
lastTrimLevel
Last memory trim level reported to the process: corresponds to
the values supplied to |
public
int |
lru
An additional ordering within a particular |
public
int |
pid
The pid of this process; 0 if none |
public
String[] |
pkgList
All packages that have been loaded into the process. |
public
String |
processName
The name of the process that this object is associated with |
public
int |
uid
The user id of this process. |
Public constructors | |
---|---|
ActivityManager.RunningAppProcessInfo()
|
|
ActivityManager.RunningAppProcessInfo(String pProcessName, int pPid, String[] pArr)
|
Public methods | |
---|---|
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. |
Inherited methods | |
---|---|
From
class
java.lang.Object
| |
From
interface
android.os.Parcelable
|
int IMPORTANCE_BACKGROUND
Constant for importance
: This process process contains
background code that is expendable.
Constant Value: 400 (0x00000190)
int IMPORTANCE_EMPTY
Constant for importance
: This process is empty of any
actively running code.
Constant Value: 500 (0x000001f4)
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.
Constant Value: 100 (0x00000064)
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. This generally indicates that the process
is doing something the user actively cares about.
Constant Value: 125 (0x0000007d)
int IMPORTANCE_GONE
Constant for importance
: This process does not exist.
Constant Value: 1000 (0x000003e8)
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.
Constant Value: 130 (0x00000082)
int IMPORTANCE_SERVICE
Constant for 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).
Constant Value: 300 (0x0000012c)
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. 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.
Constant Value: 150 (0x00000096)
int IMPORTANCE_VISIBLE
Constant for 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.
Constant Value: 200 (0x000000c8)
int REASON_PROVIDER_IN_USE
Constant for 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
.
Constant Value: 1 (0x00000001)
int REASON_SERVICE_IN_USE
Constant for 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
.
Constant Value: 2 (0x00000002)
int REASON_UNKNOWN
Constant for importanceReasonCode
: nothing special has
been specified for the reason for this level.
Constant Value: 0 (0x00000000)
int importance
The relative importance level that the system places on this
process. May be one of 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.
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 importanceReasonPid
For the specified values of 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.
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. 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.
String processName
The name of the process that this object is associated with
ActivityManager.RunningAppProcessInfo (String pProcessName, int pPid, String[] pArr)
Parameters | |
---|---|
pProcessName |
String
|
pPid |
int
|
pArr |
String
|
int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(Parcel, int)
,
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR
bit.
Returns | |
---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
void writeToParcel (Parcel dest, int flags)
Flatten this object in to a Parcel.
Parameters | |
---|---|
dest |
Parcel :
The Parcel in which the object should be written. |
flags |
int :
Additional flags about how the object should be written.
May be 0 or PARCELABLE_WRITE_RETURN_VALUE .
|