/* * 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.job; // This file is for JobScheduler enums inside the app directory. If you're // adding enums for system-server-side code, use the file in // frameworks/base/core/proto/android/server/job. option java_outer_classname = "JobProtoEnums"; option java_multiple_files = true; // Internal/debug reasons a job is stopped. // Primarily used in android.app.job.JobParameters.java. enum InternalStopReasonEnum { INTERNAL_STOP_REASON_UNKNOWN = -1; INTERNAL_STOP_REASON_CANCELLED = 0; INTERNAL_STOP_REASON_CONSTRAINTS_NOT_SATISFIED = 1; INTERNAL_STOP_REASON_PREEMPT = 2; INTERNAL_STOP_REASON_TIMEOUT = 3; INTERNAL_STOP_REASON_DEVICE_IDLE = 4; INTERNAL_STOP_REASON_DEVICE_THERMAL = 5; INTERNAL_STOP_REASON_RESTRICTED_BUCKET = 6; INTERNAL_STOP_REASON_UNINSTALL = 7; INTERNAL_STOP_REASON_DATA_CLEARED = 8; INTERNAL_STOP_REASON_RTC_UPDATED = 9; INTERNAL_STOP_REASON_SUCCESSFUL_FINISH = 10; INTERNAL_STOP_REASON_USER_UI_STOP = 11; INTERNAL_STOP_REASON_ANR = 12; } // Public stop reasons returned through JobParameters.getStopReason() enum StopReasonEnum { STOP_REASON_UNDEFINED = 0; STOP_REASON_CANCELLED_BY_APP = 1; STOP_REASON_PREEMPT = 2; STOP_REASON_TIMEOUT = 3; STOP_REASON_DEVICE_STATE = 4; STOP_REASON_CONSTRAINT_BATTERY_NOT_LOW = 5; STOP_REASON_CONSTRAINT_CHARGING = 6; STOP_REASON_CONSTRAINT_CONNECTIVITY = 7; STOP_REASON_CONSTRAINT_DEVICE_IDLE = 8; STOP_REASON_CONSTRAINT_STORAGE_NOT_LOW = 9; STOP_REASON_QUOTA = 10; STOP_REASON_BACKGROUND_RESTRICTION = 11; STOP_REASON_APP_STANDBY = 12; STOP_REASON_USER = 13; STOP_REASON_SYSTEM_PROCESSING = 14; STOP_REASON_ESTIMATED_APP_LAUNCH_TIME_CHANGED = 15; }