• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright 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 
17 package android.app.job;
18 
19 /**
20  * The server side of the JobScheduler IPC protocols.  The app-side implementation
21  * invokes on this interface to indicate completion of the (asynchronous) instructions
22  * issued by the server.
23  *
24  * In all cases, the 'who' parameter is the caller's service binder, used to track
25  * which Job Service instance is reporting.
26  *
27  * {@hide}
28  */
29 interface IJobCallback {
30     /**
31      * Immediate callback to the system after sending a start signal, used to quickly detect ANR.
32      *
33      * @param jobId Unique integer used to identify this job.
34      * @param ongoing True to indicate that the client is processing the job. False if the job is
35      * complete
36      */
acknowledgeStartMessage(int jobId, boolean ongoing)37     void acknowledgeStartMessage(int jobId, boolean ongoing);
38     /**
39      * Immediate callback to the system after sending a stop signal, used to quickly detect ANR.
40      *
41      * @param jobId Unique integer used to identify this job.
42      * @param reschedule Whether or not to reschedule this job.
43      */
acknowledgeStopMessage(int jobId, boolean reschedule)44     void acknowledgeStopMessage(int jobId, boolean reschedule);
45     /*
46      * Tell the job manager that the client is done with its execution, so that it can go on to
47      * the next one and stop attributing wakelock time to us etc.
48      *
49      * @param jobId Unique integer used to identify this job.
50      * @param reschedule Whether or not to reschedule this job.
51      */
jobFinished(int jobId, boolean reschedule)52     void jobFinished(int jobId, boolean reschedule);
53 }
54