@Test public void testIntent() { Intent intent = mRunnable.getIntent(); ComponentName componentName = intent.getComponent(); assertThat(componentName.getClassName(), is(ForceStopRunnable.BroadcastReceiver.class.getName())); assertThat(intent.getAction(), is(ForceStopRunnable.ACTION_FORCE_STOP_RESCHEDULE)); }
@VisibleForTesting public Intent getIntent() { Intent intent = new Intent(); intent.setComponent(new ComponentName(mContext, ForceStopRunnable.BroadcastReceiver.class)); intent.setAction(ACTION_FORCE_STOP_RESCHEDULE); return intent; }
ForceStopRunnable implements Runnable { @VisibleForTesting public Intent getIntent() { Intent intent = new Intent(); intent.setComponent(new ComponentName(mContext, ForceStopRunnable.BroadcastReceiver.class)); intent.setAction(ACTION_FORCE_STOP_RESCHEDULE); return intent; } }
ForceStopRunnable implements Runnable { @VisibleForTesting public Intent getIntent() { Intent intent = new Intent(); intent.setComponent(new ComponentName(mContext, ForceStopRunnable.BroadcastReceiver.class)); intent.setAction(ACTION_FORCE_STOP_RESCHEDULE); return intent; } ForceStopRunnable(@NonNull Context context, @NonNull WorkManagerImpl workManager); }
ForceStopRunnable implements Runnable { @VisibleForTesting public Intent getIntent() { Intent intent = new Intent(); intent.setComponent(new ComponentName(mContext, ForceStopRunnable.BroadcastReceiver.class)); intent.setAction(ACTION_FORCE_STOP_RESCHEDULE); return intent; } ForceStopRunnable(@NonNull Context context, @NonNull WorkManagerImpl workManager); @Override void run(); @VisibleForTesting boolean isForceStopped(); @VisibleForTesting boolean shouldCancelPersistedJobs(); @VisibleForTesting PendingIntent getPendingIntent(int alarmId, int flags); @VisibleForTesting Intent getIntent(); @VisibleForTesting @TargetApi(WorkManagerImpl.MIN_JOB_SCHEDULER_API_LEVEL) void cancelAllInJobScheduler(); }
ForceStopRunnable implements Runnable { @VisibleForTesting public Intent getIntent() { Intent intent = new Intent(); intent.setComponent(new ComponentName(mContext, ForceStopRunnable.BroadcastReceiver.class)); intent.setAction(ACTION_FORCE_STOP_RESCHEDULE); return intent; } ForceStopRunnable(@NonNull Context context, @NonNull WorkManagerImpl workManager); @Override void run(); @VisibleForTesting boolean isForceStopped(); @VisibleForTesting boolean shouldCancelPersistedJobs(); @VisibleForTesting PendingIntent getPendingIntent(int alarmId, int flags); @VisibleForTesting Intent getIntent(); @VisibleForTesting @TargetApi(WorkManagerImpl.MIN_JOB_SCHEDULER_API_LEVEL) void cancelAllInJobScheduler();  }