• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2020 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package android.app;
17 
18 /**
19  * Defines the PROCESS_STATE_* values used by ActivityManager.
20  * These values are shared by Java and native side.
21  * {@hide}
22  */
23 @Backing(type="int")
24 enum ProcessStateEnum {
25     /** @hide Not a real process state. */
26     UNKNOWN = -1,
27 
28     /** @hide Process is a persistent system process. */
29     PERSISTENT = 0,
30 
31     /** @hide Process is a persistent system process and is doing UI. */
32     PERSISTENT_UI = 1,
33 
34     /** @hide Process is hosting the current top activities.  Note that this covers
35      * all activities that are visible to the user. */
36     TOP = 2,
37 
38     /** @hide Process is bound to a TOP app. */
39     BOUND_TOP = 3,
40 
41     /** @hide Process is hosting a foreground service. */
42     FOREGROUND_SERVICE = 4,
43 
44     /** @hide Process is hosting a foreground service due to a system binding. */
45     BOUND_FOREGROUND_SERVICE = 5,
46 
47     /** @hide Process is important to the user, and something they are aware of. */
48     IMPORTANT_FOREGROUND = 6,
49 
50     /** @hide Process is important to the user, but not something they are aware of. */
51     IMPORTANT_BACKGROUND = 7,
52 
53     /** @hide Process is in the background transient so we will try to keep running. */
54     TRANSIENT_BACKGROUND = 8,
55 
56     /** @hide Process is in the background running a backup/restore operation. */
57     BACKUP = 9,
58 
59     /** @hide Process is in the background running a service.  Unlike oom_adj, this level
60      * is used for both the normal running in background state and the executing
61      * operations state. */
62     SERVICE = 10,
63 
64     /** @hide Process is in the background running a receiver.   Note that from the
65      * perspective of oom_adj, receivers run at a higher foreground level, but for our
66      * prioritization here that is not necessary and putting them below services means
67      * many fewer changes in some process states as they receive broadcasts. */
68     RECEIVER = 11,
69 
70     /** @hide Same as {@link #PROCESS_STATE_TOP} but while device is sleeping. */
71     TOP_SLEEPING = 12,
72 
73     /** @hide Process is in the background, but it can't restore its state so we want
74      * to try to avoid killing it. */
75     HEAVY_WEIGHT = 13,
76 
77     /** @hide Process is in the background but hosts the home activity. */
78     HOME = 14,
79 
80     /** @hide Process is in the background but hosts the last shown activity. */
81     LAST_ACTIVITY = 15,
82 
83     /** @hide Process is being cached for later use and contains activities. */
84     CACHED_ACTIVITY = 16,
85 
86     /** @hide Process is being cached for later use and is a client of another cached
87      * process that contains activities. */
88     CACHED_ACTIVITY_CLIENT = 17,
89 
90     /** @hide Process is being cached for later use and has an activity that corresponds
91      * to an existing recent task. */
92     CACHED_RECENT = 18,
93 
94     /** @hide Process is being cached for later use and is empty. */
95     CACHED_EMPTY = 19,
96 
97     /** @hide Process does not exist. */
98     NONEXISTENT = 20,
99 
100 }
101