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

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: Clean up background section of documentation Created 3 years, 10 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 * @param context the current context.
19 * @param taskInfo the information about the task to be scheduled.
20 * @return true if the schedule operation succeeded, and false otherwise.
21 * @see TaskInfo
22 */
23 boolean schedule(Context context, TaskInfo taskInfo);
24
25 /**
26 * Cancels the task specified by the task ID.
27 * @param context the current context.
28 * @param taskId the ID of the task to cancel. See {@link TaskIds} for a lis t.
29 */
30 void cancel(Context context, int taskId);
31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698