RunningAppProcessInfo
open class RunningAppProcessInfo : Parcelable
kotlin.Any | |
↳ | android.app.ActivityManager.RunningAppProcessInfo |
Information you can retrieve about a running process.
Summary
Constants | |
---|---|
static Int | |
static Int |
Constant for |
static Int |
Constant for |
static Int |
Constant for |
static Int |
Constant for |
static Int |
Constant for |
static Int |
Constant for |
static Int |
Constant for |
static Int |
Constant for |
static Int |
Constant for |
static Int |
Constant for |
static Int | |
static Int |
Constant for |
static Int |
Constant for |
static Int |
Constant for |
static Int |
Constant for |
Inherited constants | |
---|---|
Public constructors | |
---|---|
RunningAppProcessInfo(pProcessName: String!, pPid: Int, pArr: Array<String!>!) |
Public methods | |
---|---|
open Int | |
open Unit |
readFromParcel(source: Parcel!) |
open Unit |
writeToParcel(dest: Parcel, flags: Int) |
Properties | |
---|---|
static Parcelable.Creator<ActivityManager.RunningAppProcessInfo!> | |
Int |
The relative importance level that the system places on this process. |
Int |
The reason for |
ComponentName! |
For the specified values of |
Int |
For the specified values of |
Int |
Last memory trim level reported to the process: corresponds to the values supplied to |
Int |
An additional ordering within a particular |
Int |
The pid of this process; 0 if none |
Array<String!>! |
All packages that have been loaded into the process. |
String! |
The name of the process that this object is associated with |
Int |
The user id of this process. |
Constants
IMPORTANCE_BACKGROUND
static valIMPORTANCE_BACKGROUND: Int
Deprecated: Renamed to IMPORTANCE_CACHED
.
Value: 400
IMPORTANCE_CACHED
static val IMPORTANCE_CACHED: Int
Constant for importance
: This process contains cached code that is expendable, not actively running any app components we care about.
Value: 400
IMPORTANCE_CANT_SAVE_STATE
static val IMPORTANCE_CANT_SAVE_STATE: Int
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. This will be used with apps that have android.R.attr#cantSaveState
set on their application tag.
Value: 350
IMPORTANCE_EMPTY
static valIMPORTANCE_EMPTY: Int
Deprecated: This value is no longer reported, use IMPORTANCE_CACHED
instead.
Constant for importance
: This process is empty of any actively running code.
Value: 500
IMPORTANCE_FOREGROUND
static val IMPORTANCE_FOREGROUND: Int
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.
Value: 100
IMPORTANCE_FOREGROUND_SERVICE
static val IMPORTANCE_FOREGROUND_SERVICE: Int
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.
Value: 125
IMPORTANCE_GONE
static val IMPORTANCE_GONE: Int
Constant for importance
: This process does not exist.
Value: 1000
IMPORTANCE_PERCEPTIBLE
static val IMPORTANCE_PERCEPTIBLE: Int
Constant for importance
: This process is not something the user is directly aware of, but is otherwise perceptible to them to some degree.
Value: 230
IMPORTANCE_PERCEPTIBLE_PRE_26
static val IMPORTANCE_PERCEPTIBLE_PRE_26: Int
Constant for importance
: IMPORTANCE_PERCEPTIBLE
had this wrong value before Build.VERSION_CODES#O
. Since the Build.VERSION_CODES#O
SDK, the value of IMPORTANCE_PERCEPTIBLE
has been fixed.
The system will return this value instead of IMPORTANCE_PERCEPTIBLE
on Android versions below Build.VERSION_CODES#O
.
On Android version Build.VERSION_CODES#O
and later, this value will still be returned for apps with the target API level below Build.VERSION_CODES#O
. For apps targeting version Build.VERSION_CODES#O
and later, the correct value IMPORTANCE_PERCEPTIBLE
will be returned.
Value: 130
IMPORTANCE_SERVICE
static val IMPORTANCE_SERVICE: Int
Constant for importance
: This process 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).
Value: 300
IMPORTANCE_TOP_SLEEPING
static val IMPORTANCE_TOP_SLEEPING: Int
Constant for importance
: This process is running the foreground UI, but the device is asleep so it is not visible to the user. Though the system will try hard to keep its process from being killed, in all other ways we consider it a kind of cached process, with the limitations that go along with that state: network access, running background services, etc.
Value: 325
IMPORTANCE_TOP_SLEEPING_PRE_28
static valIMPORTANCE_TOP_SLEEPING_PRE_28: Int
Deprecated: Pre-android.os.Build.VERSION_CODES#P
version of IMPORTANCE_TOP_SLEEPING
. As of Android android.os.Build.VERSION_CODES#P
, this is considered much less important since we want to reduce what apps can do when the screen is off.
Value: 150
IMPORTANCE_VISIBLE
static val IMPORTANCE_VISIBLE: Int
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 considers important.
Value: 200
REASON_PROVIDER_IN_USE
static val REASON_PROVIDER_IN_USE: Int
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
.
Value: 1
REASON_SERVICE_IN_USE
static val REASON_SERVICE_IN_USE: Int
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
.
Value: 2
REASON_UNKNOWN
static val REASON_UNKNOWN: Int
Constant for importanceReasonCode
: nothing special has been specified for the reason for this level.
Value: 0
Public constructors
RunningAppProcessInfo
RunningAppProcessInfo(
pProcessName: String!,
pPid: Int,
pArr: Array<String!>!)
Public methods
describeContents
open fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
writeToParcel
open fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Parameters | |
---|---|
dest |
Parcel: The Parcel in which the object should be written. This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |
Properties
CREATOR
static val CREATOR: Parcelable.Creator<ActivityManager.RunningAppProcessInfo!>
importance
var importance: Int
The relative importance level that the system places on this process. These constants are numbered so that "more important" values are always smaller than "less important" values.
Value is android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_FOREGROUND
, android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_FOREGROUND_SERVICE
, android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_TOP_SLEEPING
, android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_VISIBLE
, android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_PERCEPTIBLE
, android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_CANT_SAVE_STATE
, android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_SERVICE
, android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_CACHED
, or android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_GONE
importanceReasonCode
var importanceReasonCode: Int
The reason for importance
, if any.
importanceReasonComponent
var importanceReasonComponent: ComponentName!
For the specified values of importanceReasonCode
, this is the name of the component that is being used in this process.
importanceReasonPid
var importanceReasonPid: Int
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.
lastTrimLevel
var lastTrimLevel: Int
Last memory trim level reported to the process: corresponds to the values supplied to ComponentCallbacks2.onTrimMemory(int)
.
lru
var lru: Int
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_CACHED
category, though others may be maintained in the future.
pkgList
var pkgList: Array<String!>!
All packages that have been loaded into the process.
processName
var processName: String!
The name of the process that this object is associated with