blob: 3412a32e7b750b34deea4f05287c1c7abf5aa185 [file] [log] [blame]
Kweku Adamse6b00c22017-10-23 16:46:45 -07001/*
2 * Copyright (C) 2017 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
17syntax = "proto2";
18
19package android.app;
20
21option java_multiple_files = true;
22
Joe Onorato62c220b2017-11-18 20:32:56 -080023// ActivityManager.java PROCESS_STATEs
24enum ProcessState {
25 // Order matters for process states, so values have been spaced to provide
26 // room for future additions.
Kweku Adamse6b00c22017-10-23 16:46:45 -070027
Joe Onorato62c220b2017-11-18 20:32:56 -080028 // Not a real process state.
29 PROCESS_STATE_UNKNOWN = -100;
30 // Process is a persistent system process.
31 PROCESS_STATE_PERSISTENT = 0;
32 // Process is a persistent system process and is doing UI.
33 PROCESS_STATE_PERSISTENT_UI = 100;
34 // Process is hosting the current top activities. Note that this covers
35 // all activities that are visible to the user.
36 PROCESS_STATE_TOP = 200;
37 // Process is hosting a foreground service due to a system binding.
38 PROCESS_STATE_BOUND_FOREGROUND_SERVICE = 300;
39 // Process is hosting a foreground service.
40 PROCESS_STATE_FOREGROUND_SERVICE = 400;
Joe Onorato62c220b2017-11-18 20:32:56 -080041 // Process is important to the user, and something they are aware of.
Kweku Adamsbee6d5f2018-01-04 10:03:39 -080042 PROCESS_STATE_IMPORTANT_FOREGROUND = 500;
Joe Onorato62c220b2017-11-18 20:32:56 -080043 // Process is important to the user, but not something they are aware of.
Kweku Adamsbee6d5f2018-01-04 10:03:39 -080044 PROCESS_STATE_IMPORTANT_BACKGROUND = 600;
Joe Onorato62c220b2017-11-18 20:32:56 -080045 // Process is in the background transient so we will try to keep running.
Kweku Adamsbee6d5f2018-01-04 10:03:39 -080046 PROCESS_STATE_TRANSIENT_BACKGROUND = 700;
Joe Onorato62c220b2017-11-18 20:32:56 -080047 // Process is in the background running a backup/restore operation.
Kweku Adamsbee6d5f2018-01-04 10:03:39 -080048 PROCESS_STATE_BACKUP = 800;
Joe Onorato62c220b2017-11-18 20:32:56 -080049 // Process is in the background running a service. Unlike oom_adj, this
50 // level is used for both the normal running in background state and the
51 // executing operations state.
Kweku Adamsbee6d5f2018-01-04 10:03:39 -080052 PROCESS_STATE_SERVICE = 900;
Joe Onorato62c220b2017-11-18 20:32:56 -080053 // Process is in the background running a receiver. Note that from the
54 // perspective of oom_adj, receivers run at a higher foreground level, but
55 // for our prioritization here that is not necessary and putting them
56 // below services means many fewer changes in some process states as they
57 // receive broadcasts.
Kweku Adamsbee6d5f2018-01-04 10:03:39 -080058 PROCESS_STATE_RECEIVER = 1000;
59 // Same as PROCESS_STATE_TOP but while device is sleeping.
60 PROCESS_STATE_TOP_SLEEPING = 1100;
61 // Process is in the background, but it can't restore its state so we want
62 // to try to avoid killing it.
63 PROCESS_STATE_HEAVY_WEIGHT = 1200;
Joe Onorato62c220b2017-11-18 20:32:56 -080064 // Process is in the background but hosts the home activity.
65 PROCESS_STATE_HOME = 1300;
66 // Process is in the background but hosts the last shown activity.
67 PROCESS_STATE_LAST_ACTIVITY = 1400;
68 // Process is being cached for later use and contains activities.
69 PROCESS_STATE_CACHED_ACTIVITY = 1500;
70 // Process is being cached for later use and is a client of another cached
71 // process that contains activities.
72 PROCESS_STATE_CACHED_ACTIVITY_CLIENT = 1600;
Kweku Adamsbee6d5f2018-01-04 10:03:39 -080073 // Process is being cached for later use and has an activity that corresponds
74 // to an existing recent task.
75 PROCESS_STATE_CACHED_RECENT = 1700;
Joe Onorato62c220b2017-11-18 20:32:56 -080076 // Process is being cached for later use and is empty.
Kweku Adamsbee6d5f2018-01-04 10:03:39 -080077 PROCESS_STATE_CACHED_EMPTY = 1800;
Joe Onorato62c220b2017-11-18 20:32:56 -080078 // Process does not exist.
Kweku Adamsbee6d5f2018-01-04 10:03:39 -080079 PROCESS_STATE_NONEXISTENT = 1900;
Kweku Adamse6b00c22017-10-23 16:46:45 -070080}
Joe Onorato62c220b2017-11-18 20:32:56 -080081