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

Side by Side Diff: components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskGcmTaskService.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 com.google.android.gms.gcm.GcmNetworkManager; 7 import com.google.android.gms.gcm.GcmNetworkManager;
8 import com.google.android.gms.gcm.GcmTaskService; 8 import com.google.android.gms.gcm.GcmTaskService;
9 import com.google.android.gms.gcm.TaskParams; 9 import com.google.android.gms.gcm.TaskParams;
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 ContextUtils.getApplicationContext(), taskParams)); 117 ContextUtils.getApplicationContext(), taskParams));
118 } 118 }
119 }); 119 });
120 120
121 if (taskNeedsRescheduling.get()) return GcmNetworkManager.RESULT_RESCHED ULE; 121 if (taskNeedsRescheduling.get()) return GcmNetworkManager.RESULT_RESCHED ULE;
122 122
123 return GcmNetworkManager.RESULT_SUCCESS; 123 return GcmNetworkManager.RESULT_SUCCESS;
124 } 124 }
125 125
126 @Override 126 @Override
127 public void onInitializeTasks() {} 127 public void onInitializeTasks() {
128 BackgroundTaskSchedulerFactory.getScheduler().reschedule(
129 ContextUtils.getApplicationContext());
130 }
128 } 131 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698