You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
465 lines
16 KiB
465 lines
16 KiB
/*
|
|
* Copyright (C) 2017 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
syntax = "proto2";
|
|
|
|
package android.app;
|
|
|
|
option java_outer_classname = "AppProtoEnums";
|
|
option java_multiple_files = true;
|
|
|
|
// ActivityManagerInternal.java's APP_TRANSITION reasons.
|
|
enum AppTransitionReasonEnum {
|
|
APP_TRANSITION_REASON_UNKNOWN = 0;
|
|
// The transition was started because we drew the splash screen.
|
|
APP_TRANSITION_SPLASH_SCREEN = 1;
|
|
// The transition was started because we all app windows were drawn.
|
|
APP_TRANSITION_WINDOWS_DRAWN = 2;
|
|
// The transition was started because of a timeout.
|
|
APP_TRANSITION_TIMEOUT = 3;
|
|
// The transition was started because of a we drew a task snapshot.
|
|
APP_TRANSITION_SNAPSHOT = 4;
|
|
// The transition was started because it was a recents animation and we only needed to wait on
|
|
// the wallpaper.
|
|
APP_TRANSITION_RECENTS_ANIM = 5;
|
|
}
|
|
|
|
// ActivityManager.java PROCESS_STATEs
|
|
// Next tag: 1021
|
|
enum ProcessStateEnum {
|
|
// Unlike the ActivityManager PROCESS_STATE values, the ordering and numerical values
|
|
// here are completely fixed and arbitrary. Order is irrelevant.
|
|
// No attempt need be made to keep them in sync.
|
|
// The values here must not be modified. Any new process states can be appended to the end.
|
|
|
|
// Process state that is unknown to this proto file (i.e. is not mapped
|
|
// by ActivityManager.processStateAmToProto()). Can only happen if there's a bug in the mapping.
|
|
PROCESS_STATE_UNKNOWN_TO_PROTO = 998;
|
|
// Not a real process state.
|
|
PROCESS_STATE_UNKNOWN = 999;
|
|
// Process is a persistent system process.
|
|
PROCESS_STATE_PERSISTENT = 1000;
|
|
// Process is a persistent system process and is doing UI.
|
|
PROCESS_STATE_PERSISTENT_UI = 1001;
|
|
// Process is hosting the current top activities. Note that this covers
|
|
// all activities that are visible to the user.
|
|
PROCESS_STATE_TOP = 1002;
|
|
// Process is bound to a TOP app.
|
|
PROCESS_STATE_BOUND_TOP = 1020;
|
|
// Process is hosting a foreground service.
|
|
PROCESS_STATE_FOREGROUND_SERVICE = 1003;
|
|
// Process is hosting a service bound by the system or another foreground app.
|
|
PROCESS_STATE_BOUND_FOREGROUND_SERVICE = 1004;
|
|
// Process is important to the user, and something they are aware of.
|
|
PROCESS_STATE_IMPORTANT_FOREGROUND = 1005;
|
|
// Process is important to the user, but not something they are aware of.
|
|
PROCESS_STATE_IMPORTANT_BACKGROUND = 1006;
|
|
// Process is in the background transient so we will try to keep running.
|
|
PROCESS_STATE_TRANSIENT_BACKGROUND = 1007;
|
|
// Process is in the background running a backup/restore operation.
|
|
PROCESS_STATE_BACKUP = 1008;
|
|
// Process is in the background running a service. Unlike oom_adj, this
|
|
// level is used for both the normal running in background state and the
|
|
// executing operations state.
|
|
PROCESS_STATE_SERVICE = 1009;
|
|
// Process is in the background running a receiver. Note that from the
|
|
// perspective of oom_adj, receivers run at a higher foreground level, but
|
|
// for our prioritization here that is not necessary and putting them
|
|
// below services means many fewer changes in some process states as they
|
|
// receive broadcasts.
|
|
PROCESS_STATE_RECEIVER = 1010;
|
|
// Same as PROCESS_STATE_TOP but while device is sleeping.
|
|
PROCESS_STATE_TOP_SLEEPING = 1011;
|
|
// Process is in the background, but it can't restore its state so we want
|
|
// to try to avoid killing it.
|
|
PROCESS_STATE_HEAVY_WEIGHT = 1012;
|
|
// Process is in the background but hosts the home activity.
|
|
PROCESS_STATE_HOME = 1013;
|
|
// Process is in the background but hosts the last shown activity.
|
|
PROCESS_STATE_LAST_ACTIVITY = 1014;
|
|
// Process is being cached for later use and contains activities.
|
|
PROCESS_STATE_CACHED_ACTIVITY = 1015;
|
|
// Process is being cached for later use and is a client of another cached
|
|
// process that contains activities.
|
|
PROCESS_STATE_CACHED_ACTIVITY_CLIENT = 1016;
|
|
// Process is being cached for later use and has an activity that corresponds
|
|
// to an existing recent task.
|
|
PROCESS_STATE_CACHED_RECENT = 1017;
|
|
// Process is being cached for later use and is empty.
|
|
PROCESS_STATE_CACHED_EMPTY = 1018;
|
|
// Process does not exist.
|
|
PROCESS_STATE_NONEXISTENT = 1019;
|
|
}
|
|
|
|
// AppOpsManager.java - operation ids for logging
|
|
enum AppOpEnum {
|
|
APP_OP_NONE = -1;
|
|
APP_OP_COARSE_LOCATION = 0;
|
|
APP_OP_FINE_LOCATION = 1;
|
|
APP_OP_GPS = 2;
|
|
APP_OP_VIBRATE = 3;
|
|
APP_OP_READ_CONTACTS = 4;
|
|
APP_OP_WRITE_CONTACTS = 5;
|
|
APP_OP_READ_CALL_LOG = 6;
|
|
APP_OP_WRITE_CALL_LOG = 7;
|
|
APP_OP_READ_CALENDAR = 8;
|
|
APP_OP_WRITE_CALENDAR = 9;
|
|
APP_OP_WIFI_SCAN = 10;
|
|
APP_OP_POST_NOTIFICATION = 11;
|
|
APP_OP_NEIGHBORING_CELLS = 12;
|
|
APP_OP_CALL_PHONE = 13;
|
|
APP_OP_READ_SMS = 14;
|
|
APP_OP_WRITE_SMS = 15;
|
|
APP_OP_RECEIVE_SMS = 16;
|
|
APP_OP_RECEIVE_EMERGENCY_SMS = 17;
|
|
APP_OP_RECEIVE_MMS = 18;
|
|
APP_OP_RECEIVE_WAP_PUSH = 19;
|
|
APP_OP_SEND_SMS = 20;
|
|
APP_OP_READ_ICC_SMS = 21;
|
|
APP_OP_WRITE_ICC_SMS = 22;
|
|
APP_OP_WRITE_SETTINGS = 23;
|
|
APP_OP_SYSTEM_ALERT_WINDOW = 24;
|
|
APP_OP_ACCESS_NOTIFICATIONS = 25;
|
|
APP_OP_CAMERA = 26;
|
|
APP_OP_RECORD_AUDIO = 27;
|
|
APP_OP_PLAY_AUDIO = 28;
|
|
APP_OP_READ_CLIPBOARD = 29;
|
|
APP_OP_WRITE_CLIPBOARD = 30;
|
|
APP_OP_TAKE_MEDIA_BUTTONS = 31;
|
|
APP_OP_TAKE_AUDIO_FOCUS = 32;
|
|
APP_OP_AUDIO_MASTER_VOLUME = 33;
|
|
APP_OP_AUDIO_VOICE_VOLUME = 34;
|
|
APP_OP_AUDIO_RING_VOLUME = 35;
|
|
APP_OP_AUDIO_MEDIA_VOLUME = 36;
|
|
APP_OP_AUDIO_ALARM_VOLUME = 37;
|
|
APP_OP_AUDIO_NOTIFICATION_VOLUME = 38;
|
|
APP_OP_AUDIO_BLUETOOTH_VOLUME = 39;
|
|
APP_OP_WAKE_LOCK = 40;
|
|
APP_OP_MONITOR_LOCATION = 41;
|
|
APP_OP_MONITOR_HIGH_POWER_LOCATION = 42;
|
|
APP_OP_GET_USAGE_STATS = 43;
|
|
APP_OP_MUTE_MICROPHONE = 44;
|
|
APP_OP_TOAST_WINDOW = 45;
|
|
APP_OP_PROJECT_MEDIA = 46;
|
|
APP_OP_ACTIVATE_VPN = 47;
|
|
APP_OP_WRITE_WALLPAPER = 48;
|
|
APP_OP_ASSIST_STRUCTURE = 49;
|
|
APP_OP_ASSIST_SCREENSHOT = 50;
|
|
APP_OP_READ_PHONE_STATE = 51;
|
|
APP_OP_ADD_VOICEMAIL = 52;
|
|
APP_OP_USE_SIP = 53;
|
|
APP_OP_PROCESS_OUTGOING_CALLS = 54;
|
|
APP_OP_USE_FINGERPRINT = 55;
|
|
APP_OP_BODY_SENSORS = 56;
|
|
APP_OP_READ_CELL_BROADCASTS = 57;
|
|
APP_OP_MOCK_LOCATION = 58;
|
|
APP_OP_READ_EXTERNAL_STORAGE = 59;
|
|
APP_OP_WRITE_EXTERNAL_STORAGE = 60;
|
|
APP_OP_TURN_SCREEN_ON = 61;
|
|
APP_OP_GET_ACCOUNTS = 62;
|
|
APP_OP_RUN_IN_BACKGROUND = 63;
|
|
APP_OP_AUDIO_ACCESSIBILITY_VOLUME = 64;
|
|
APP_OP_READ_PHONE_NUMBERS = 65;
|
|
APP_OP_REQUEST_INSTALL_PACKAGES = 66;
|
|
APP_OP_PICTURE_IN_PICTURE = 67;
|
|
APP_OP_INSTANT_APP_START_FOREGROUND = 68;
|
|
APP_OP_ANSWER_PHONE_CALLS = 69;
|
|
APP_OP_RUN_ANY_IN_BACKGROUND = 70;
|
|
APP_OP_CHANGE_WIFI_STATE = 71;
|
|
APP_OP_REQUEST_DELETE_PACKAGES = 72;
|
|
APP_OP_BIND_ACCESSIBILITY_SERVICE = 73;
|
|
APP_OP_ACCEPT_HANDOVER = 74;
|
|
APP_OP_MANAGE_IPSEC_TUNNELS = 75;
|
|
APP_OP_START_FOREGROUND = 76;
|
|
APP_OP_BLUETOOTH_SCAN = 77;
|
|
APP_OP_USE_BIOMETRIC = 78;
|
|
APP_OP_ACTIVITY_RECOGNITION = 79;
|
|
APP_OP_SMS_FINANCIAL_TRANSACTIONS = 80;
|
|
APP_OP_READ_MEDIA_AUDIO = 81;
|
|
APP_OP_WRITE_MEDIA_AUDIO = 82;
|
|
APP_OP_READ_MEDIA_VIDEO = 83;
|
|
APP_OP_WRITE_MEDIA_VIDEO = 84;
|
|
APP_OP_READ_MEDIA_IMAGES = 85;
|
|
APP_OP_WRITE_MEDIA_IMAGES = 86;
|
|
APP_OP_LEGACY_STORAGE = 87;
|
|
APP_OP_ACCESS_ACCESSIBILITY = 88;
|
|
APP_OP_READ_DEVICE_IDENTIFIERS = 89;
|
|
APP_OP_ACCESS_MEDIA_LOCATION = 90;
|
|
APP_OP_QUERY_ALL_PACKAGES = 91;
|
|
APP_OP_MANAGE_EXTERNAL_STORAGE = 92;
|
|
APP_OP_INTERACT_ACROSS_PROFILES = 93;
|
|
APP_OP_ACTIVATE_PLATFORM_VPN = 94;
|
|
APP_OP_LOADER_USAGE_STATS = 95;
|
|
APP_OP_DEPRECATED_1 = 96 [deprecated = true];
|
|
APP_OP_AUTO_REVOKE_PERMISSIONS_IF_UNUSED = 97;
|
|
APP_OP_AUTO_REVOKE_MANAGED_BY_INSTALLER = 98;
|
|
APP_OP_NO_ISOLATED_STORAGE = 99;
|
|
APP_OP_PHONE_CALL_MICROPHONE = 100;
|
|
APP_OP_PHONE_CALL_CAMERA = 101;
|
|
APP_OP_RECORD_AUDIO_HOTWORD = 102;
|
|
APP_OP_MANAGE_ONGOING_CALLS = 103;
|
|
APP_OP_MANAGE_CREDENTIALS = 104;
|
|
APP_OP_USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER = 105;
|
|
APP_OP_RECORD_AUDIO_OUTPUT = 106;
|
|
APP_OP_SCHEDULE_EXACT_ALARM = 107;
|
|
APP_OP_FINE_LOCATION_SOURCE = 108;
|
|
APP_OP_COARSE_LOCATION_SOURCE = 109;
|
|
APP_OP_MANAGE_MEDIA = 110;
|
|
APP_OP_BLUETOOTH_CONNECT = 111;
|
|
APP_OP_UWB_RANGING = 112;
|
|
APP_OP_ACTIVITY_RECOGNITION_SOURCE = 113;
|
|
APP_OP_BLUETOOTH_ADVERTISE = 114;
|
|
APP_OP_RECORD_INCOMING_PHONE_AUDIO = 115;
|
|
}
|
|
|
|
/**
|
|
* The reason code that why app process is killed.
|
|
*/
|
|
enum AppExitReasonCode {
|
|
/**
|
|
* Application process died due to unknown reason.
|
|
*/
|
|
REASON_UNKNOWN = 0;
|
|
|
|
/**
|
|
* Application process exit normally by itself, for example,
|
|
* via {@link android.os.Process#exit}; {@link #status} will specify the exit code.
|
|
*
|
|
* <p>Applications should normally not do this, as the system has a better knowledge
|
|
* in terms of process management.</p>
|
|
*/
|
|
REASON_EXIT_SELF = 1;
|
|
|
|
/**
|
|
* Application process died due to the result of an OS signal; for example,
|
|
* {@link android.os.Process#SIGNAL_KILL}; {@link #status} will specify the signum.
|
|
*/
|
|
REASON_SIGNALED = 2;
|
|
|
|
/**
|
|
* Application process was killed by the system low memory killer, meaning the system was
|
|
* under memory pressure at the time of kill.
|
|
*/
|
|
REASON_LOW_MEMORY = 3;
|
|
|
|
/**
|
|
* Application process died because of an unhandled exception in Java code.
|
|
*/
|
|
REASON_CRASH = 4;
|
|
|
|
/**
|
|
* Application process died because it's crashed due to a native code crash.
|
|
*/
|
|
REASON_CRASH_NATIVE = 5;
|
|
|
|
/**
|
|
* Application process was killed due to being unresponsive (ANR).
|
|
*/
|
|
REASON_ANR = 6;
|
|
|
|
/**
|
|
* Application process was killed because it took too long to attach to the system
|
|
* during the start.
|
|
*/
|
|
REASON_INITIALIZATION_FAILURE = 7;
|
|
|
|
/**
|
|
* Application process was killed because of initialization failure,
|
|
* for example, it took too long to attach to the system during the start,
|
|
* or there was an error during initialization.
|
|
*/
|
|
REASON_PERMISSION_CHANGE = 8;
|
|
|
|
/**
|
|
* Application process was killed by the activity manager due to excessive resource usage.
|
|
*/
|
|
REASON_EXCESSIVE_RESOURCE_USAGE = 9;
|
|
|
|
/**
|
|
* Application process was killed because of the user request, for example,
|
|
* user clicked the "Force stop" button of the application in the Settings,
|
|
* or swiped away the application from Recents.
|
|
*/
|
|
REASON_USER_REQUESTED = 10;
|
|
|
|
/**
|
|
* Application process was killed, because the user they are running as on devices
|
|
* with mutlple users, was stopped.
|
|
*/
|
|
REASON_USER_STOPPED = 11;
|
|
|
|
/**
|
|
* Application process was killed because its dependency was going away, for example,
|
|
* a stable content provider connection's client will be killed if the provider is killed.
|
|
*/
|
|
REASON_DEPENDENCY_DIED = 12;
|
|
|
|
/**
|
|
* Application process was killed by the system for various other reasons,
|
|
* for example, the application package got disabled by the user;
|
|
* {@link #description} will specify the cause given by the system.
|
|
*/
|
|
REASON_OTHER = 13;
|
|
}
|
|
|
|
/**
|
|
* The supplemental reason code that why app process is killed
|
|
*/
|
|
enum AppExitSubReasonCode {
|
|
/**
|
|
* Application process kills subReason is unknown.
|
|
*/
|
|
SUBREASON_UNKNOWN = 0;
|
|
|
|
/**
|
|
* Application process was killed because user quit it on the "wait for debugger" dialog.
|
|
*/
|
|
SUBREASON_WAIT_FOR_DEBUGGER = 1;
|
|
|
|
/**
|
|
* Application process was killed by the activity manager because there were too many cached
|
|
* processes.
|
|
*/
|
|
SUBREASON_TOO_MANY_CACHED = 2;
|
|
|
|
/**
|
|
* Application process was killed by the activity manager because there were too many empty
|
|
* processes.
|
|
*/
|
|
SUBREASON_TOO_MANY_EMPTY = 3;
|
|
|
|
/**
|
|
* Application process was killed by the activity manager because there were too many cached
|
|
* processes and this process had been in empty state for a long time.
|
|
*/
|
|
SUBREASON_TRIM_EMPTY = 4;
|
|
|
|
/**
|
|
* Application process was killed by the activity manager because system was on
|
|
* memory pressure and this process took large amount of cached memory.
|
|
*/
|
|
SUBREASON_LARGE_CACHED = 5;
|
|
|
|
/**
|
|
* Application process was killed by the activity manager because the system was on
|
|
* low memory pressure for a significant amount of time since last idle.
|
|
*/
|
|
SUBREASON_MEMORY_PRESSURE = 6;
|
|
|
|
/**
|
|
* Application process was killed by the activity manager due to excessive CPU usage.
|
|
*/
|
|
SUBREASON_EXCESSIVE_CPU = 7;
|
|
|
|
/**
|
|
* System update has done (so the system update process should be killed).
|
|
*/
|
|
SUBREASON_SYSTEM_UPDATE_DONE = 8;
|
|
|
|
/**
|
|
* Kill all foreground services, for now it only occurs when enabling the quiet
|
|
* mode for the managed profile.
|
|
*/
|
|
SUBREASON_KILL_ALL_FG = 9;
|
|
|
|
/**
|
|
* All background processes except certain ones were killed, for now it only occurs
|
|
* when the density of the default display is changed.
|
|
*/
|
|
SUBREASON_KILL_ALL_BG_EXCEPT = 10;
|
|
|
|
/**
|
|
* The process associated with the UID was explicitly killed, for example,
|
|
* it could be because of permission changes.
|
|
*/
|
|
SUBREASON_KILL_UID = 11;
|
|
|
|
/**
|
|
* The process was explicitly killed with its PID, typically because of
|
|
* the low memory for surfaces.
|
|
*/
|
|
SUBREASON_KILL_PID = 12;
|
|
|
|
/**
|
|
* The start of the process was invalid.
|
|
*/
|
|
SUBREASON_INVALID_START = 13;
|
|
|
|
/**
|
|
* The process was killed because it's in an invalid state, typically
|
|
* it's triggered from SHELL.
|
|
*/
|
|
SUBREASON_INVALID_STATE = 14;
|
|
|
|
/**
|
|
* The process was killed when it's imperceptible to user, because it was
|
|
* in a bad state.
|
|
*/
|
|
SUBREASON_IMPERCEPTIBLE = 15;
|
|
|
|
/**
|
|
* The process was killed because it's being moved out from LRU list.
|
|
*/
|
|
SUBREASON_REMOVE_LRU = 16;
|
|
|
|
/**
|
|
* The process was killed because it's isolated and was in a cached state.
|
|
*/
|
|
SUBREASON_ISOLATED_NOT_NEEDED = 17;
|
|
|
|
/**
|
|
* The process was killed because it's in forced-app-standby state, and it's cached and
|
|
* its uid state is idle; this would be set only when the reason is {@link #REASON_OTHER}.
|
|
*/
|
|
SUBREASON_CACHED_IDLE_FORCED_APP_STANDBY = 18;
|
|
|
|
/**
|
|
* The process was killed because it fails to freeze/unfreeze binder
|
|
* or query binder frozen info while being frozen.
|
|
*/
|
|
SUBREASON_FREEZER_BINDER_IOCTL = 19;
|
|
|
|
/**
|
|
* The process was killed because it receives sync binder transactions
|
|
* while being frozen.
|
|
*/
|
|
SUBREASON_FREEZER_BINDER_TRANSACTION = 20;
|
|
}
|
|
|
|
/**
|
|
* The relative importance level that the system places on a process.
|
|
* Keep sync with the definitions in
|
|
* {@link android.app.ActivityManager.RunningAppProcessInfo}
|
|
*/
|
|
enum Importance {
|
|
option allow_alias = true;
|
|
|
|
IMPORTANCE_FOREGROUND = 100;
|
|
IMPORTANCE_FOREGROUND_SERVICE = 125;
|
|
IMPORTANCE_TOP_SLEEPING_PRE_28 = 150;
|
|
IMPORTANCE_VISIBLE = 200;
|
|
IMPORTANCE_PERCEPTIBLE_PRE_26 = 130;
|
|
IMPORTANCE_PERCEPTIBLE = 230;
|
|
IMPORTANCE_CANT_SAVE_STATE_PRE_26 = 170;
|
|
IMPORTANCE_SERVICE = 300;
|
|
IMPORTANCE_TOP_SLEEPING = 325;
|
|
IMPORTANCE_CANT_SAVE_STATE = 350;
|
|
IMPORTANCE_CACHED = 400;
|
|
IMPORTANCE_BACKGROUND = 400;
|
|
IMPORTANCE_EMPTY = 500;
|
|
IMPORTANCE_GONE = 1000;
|
|
}
|