1/* 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.job; 20 21// This file is for JobScheduler enums inside the app directory. If you're 22// adding enums for system-server-side code, use the file in 23// frameworks/base/core/proto/android/server/job. 24option java_outer_classname = "JobProtoEnums"; 25option java_multiple_files = true; 26 27// Internal/debug reasons a job is stopped. 28// Primarily used in android.app.job.JobParameters.java. 29enum InternalStopReasonEnum { 30 INTERNAL_STOP_REASON_UNKNOWN = -1; 31 INTERNAL_STOP_REASON_CANCELLED = 0; 32 INTERNAL_STOP_REASON_CONSTRAINTS_NOT_SATISFIED = 1; 33 INTERNAL_STOP_REASON_PREEMPT = 2; 34 INTERNAL_STOP_REASON_TIMEOUT = 3; 35 INTERNAL_STOP_REASON_DEVICE_IDLE = 4; 36 INTERNAL_STOP_REASON_DEVICE_THERMAL = 5; 37 INTERNAL_STOP_REASON_RESTRICTED_BUCKET = 6; 38 INTERNAL_STOP_REASON_UNINSTALL = 7; 39 INTERNAL_STOP_REASON_DATA_CLEARED = 8; 40 INTERNAL_STOP_REASON_RTC_UPDATED = 9; 41 INTERNAL_STOP_REASON_SUCCESSFUL_FINISH = 10; 42 INTERNAL_STOP_REASON_USER_UI_STOP = 11; 43 INTERNAL_STOP_REASON_ANR = 12; 44} 45 46// Public stop reasons returned through JobParameters.getStopReason() 47enum StopReasonEnum { 48 STOP_REASON_UNDEFINED = 0; 49 STOP_REASON_CANCELLED_BY_APP = 1; 50 STOP_REASON_PREEMPT = 2; 51 STOP_REASON_TIMEOUT = 3; 52 STOP_REASON_DEVICE_STATE = 4; 53 STOP_REASON_CONSTRAINT_BATTERY_NOT_LOW = 5; 54 STOP_REASON_CONSTRAINT_CHARGING = 6; 55 STOP_REASON_CONSTRAINT_CONNECTIVITY = 7; 56 STOP_REASON_CONSTRAINT_DEVICE_IDLE = 8; 57 STOP_REASON_CONSTRAINT_STORAGE_NOT_LOW = 9; 58 STOP_REASON_QUOTA = 10; 59 STOP_REASON_BACKGROUND_RESTRICTION = 11; 60 STOP_REASON_APP_STANDBY = 12; 61 STOP_REASON_USER = 13; 62 STOP_REASON_SYSTEM_PROCESSING = 14; 63 STOP_REASON_ESTIMATED_APP_LAUNCH_TIME_CHANGED = 15; 64} 65