blob: 655abd73e6addaf254afca8f7cb8702904df26ca [file] [log] [blame]
Matthew Williams691e93e2014-05-12 15:33:09 -07001/*
2 * Copyright (C) 2014 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
Christopher Tate7060b042014-06-09 19:50:00 -070017package com.android.server.job;
Matthew Williams691e93e2014-05-12 15:33:09 -070018
Christopher Tate7060b042014-06-09 19:50:00 -070019import com.android.server.job.controllers.JobStatus;
Matthew Williams9b9244b62014-05-14 11:06:04 -070020
Matthew Williams691e93e2014-05-12 15:33:09 -070021/**
Christopher Tate7060b042014-06-09 19:50:00 -070022 * Used for communication between {@link com.android.server.job.JobServiceContext} and the
23 * {@link com.android.server.job.JobSchedulerService}.
Matthew Williams691e93e2014-05-12 15:33:09 -070024 */
Christopher Tate7060b042014-06-09 19:50:00 -070025public interface JobCompletedListener {
Matthew Williams691e93e2014-05-12 15:33:09 -070026 /**
Christopher Tate7060b042014-06-09 19:50:00 -070027 * Callback for when a job is completed.
28 * @param needsReschedule Whether the implementing class should reschedule this job.
Matthew Williams691e93e2014-05-12 15:33:09 -070029 */
Dianne Hackbornef3aa6e2016-04-29 18:18:08 -070030 void onJobCompleted(JobStatus jobStatus, boolean needsReschedule);
Matthew Williams691e93e2014-05-12 15:33:09 -070031}