List of usage examples for android.app.job JobScheduler getPendingJob
public abstract @Nullable JobInfo getPendingJob(int jobId);
From source file:com.android.contacts.DynamicShortcuts.java
@VisibleForTesting public static boolean isJobScheduled(Context context) { final JobScheduler scheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE); return scheduler.getPendingJob(ContactsJobService.DYNAMIC_SHORTCUTS_JOB_ID) != null; }