Move cancel and retry to bg thread.

This commit is contained in:
Alex Hart
2025-04-15 13:15:16 -03:00
committed by GitHub
parent 44bfa514a5
commit 250ac481c8
4 changed files with 39 additions and 18 deletions

View File

@@ -288,6 +288,7 @@ public class JobManager implements ConstraintObserver.Notifier {
* Search through the list of pending jobs and find all that match a given predicate. Note that there will always be races here, and the result you get back
* may not be valid anymore by the time you get it. Use with caution.
*/
@WorkerThread
public @NonNull List<JobSpec> find(@NonNull Predicate<JobSpec> predicate) {
waitUntilInitialized();
return jobController.findJobs(predicate);