@MediumTest @Test public void testEnqueueOne() throws Throwable { initStatics(); TestIntentItem[] items = new TestIntentItem[] { new TestIntentItem(new Intent("FIRST")), }; for (TestIntentItem item : items) { JobIntentService.enqueueWork(mContext, TargetService.class, JOB_ID, item.intent); } allowServiceToRun(); waitServiceFinish(); compareIntents(items, sFinishedWork); }
public static void enqueueWork(@NonNull Context context, @NonNull Class cls, int jobId, @NonNull Intent work) { enqueueWork(context, new ComponentName(context, cls), jobId, work); }
JobIntentService extends Service { public static void enqueueWork(@NonNull Context context, @NonNull Class cls, int jobId, @NonNull Intent work) { enqueueWork(context, new ComponentName(context, cls), jobId, work); } }
JobIntentService extends Service { public static void enqueueWork(@NonNull Context context, @NonNull Class cls, int jobId, @NonNull Intent work) { enqueueWork(context, new ComponentName(context, cls), jobId, work); } JobIntentService(); }
JobIntentService extends Service { public static void enqueueWork(@NonNull Context context, @NonNull Class cls, int jobId, @NonNull Intent work) { enqueueWork(context, new ComponentName(context, cls), jobId, work); } JobIntentService(); @Override void onCreate(); @Override int onStartCommand(@Nullable Intent intent, int flags, int startId); @Override IBinder onBind(@NonNull Intent intent); @Override void onDestroy(); static void enqueueWork(@NonNull Context context, @NonNull Class cls, int jobId,
            @NonNull Intent work); static void enqueueWork(@NonNull Context context, @NonNull ComponentName component,
            int jobId, @NonNull Intent work); void setInterruptIfStopped(boolean interruptIfStopped); boolean isStopped(); boolean onStopCurrentWork(); }
JobIntentService extends Service { public static void enqueueWork(@NonNull Context context, @NonNull Class cls, int jobId, @NonNull Intent work) { enqueueWork(context, new ComponentName(context, cls), jobId, work); } JobIntentService(); @Override void onCreate(); @Override int onStartCommand(@Nullable Intent intent, int flags, int startId); @Override IBinder onBind(@NonNull Intent intent); @Override void onDestroy(); static void enqueueWork(@NonNull Context context, @NonNull Class cls, int jobId,
            @NonNull Intent work); static void enqueueWork(@NonNull Context context, @NonNull ComponentName component,
            int jobId, @NonNull Intent work); void setInterruptIfStopped(boolean interruptIfStopped); boolean isStopped(); boolean onStopCurrentWork();  }