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

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

Issue 2814653003: [Android] BackgroundTaskScheduler reschedule implementation (Closed)
Patch Set: Rebasing Created 3 years, 7 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.components.background_task_scheduler; 5 package org.chromium.components.background_task_scheduler;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.support.annotation.AnyThread; 8 import android.support.annotation.AnyThread;
9 import android.support.annotation.MainThread; 9 import android.support.annotation.MainThread;
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 * 62 *
63 * @param context the current context. 63 * @param context the current context.
64 * @param taskParameters the data passed in as {@link TaskInfo} when the tas k was scheduled. 64 * @param taskParameters the data passed in as {@link TaskInfo} when the tas k was scheduled.
65 * @return true if the task needs to be rescheduled according to the resched uling criteria 65 * @return true if the task needs to be rescheduled according to the resched uling criteria
66 * specified when the task was scheduled initially. False if the taskshould not be rescheduled. 66 * specified when the task was scheduled initially. False if the taskshould not be rescheduled.
67 * Regardless of the value returned, your task must stop executing. 67 * Regardless of the value returned, your task must stop executing.
68 * @see TaskInfo 68 * @see TaskInfo
69 */ 69 */
70 @MainThread 70 @MainThread
71 boolean onStopTask(Context context, TaskParameters taskParameters); 71 boolean onStopTask(Context context, TaskParameters taskParameters);
72
73 /**
74 * Callback from {@link BackgroundTaskScheduler} when it detects system cond itions requiring
75 * rescheduling, e.g. Google Play Services update or OS upgrade. The task sh ould schedule itself
76 * again with appropriate parameters.
77 *
78 * @param context the current context.
79 */
80 @MainThread
81 void reschedule(Context context);
72 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698