Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerDelegate.java

Issue 2714463002: [android] Add JobScheduler-based BackgroundTaskScheduler. (Closed)
Patch Set: FindBugs wants the real Pi, but I won't give it. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.components.background_task_scheduler;
6
7 import android.content.Context;
8
9 /**
10 * The internal representation of a {@link BackgroundTaskScheduler} to make it p ossible to use
11 * system APIs ({@link android.app.job.JobScheduler} on newer platforms and GCM
12 * ({@link com.google.android.gms.gcm.GcmNetworkManager}) on older platforms.
13 */
14 interface BackgroundTaskSchedulerDelegate {
15 /**
16 * Schedules a background task. See {@link TaskInfo} for information on what types of tasks that
17 * can be scheduled.
18 *
19 * @param context the current context.
20 * @param taskInfo the information about the task to be scheduled.
21 * @return true if the schedule operation succeeded, and false otherwise.
22 * @see TaskInfo
23 */
24 boolean schedule(Context context, TaskInfo taskInfo);
25
26 /**
27 * Cancels the task specified by the task ID.
28 *
29 * @param context the current context.
30 * @param taskId the ID of the task to cancel. See {@link TaskIds} for a lis t.
31 */
32 void cancel(Context context, int taskId);
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698