@Test public void testAreConstraintsSatisfied_nonNetworkConstraints() { JobInvocation job = jobBuilder .setConstraints( Constraint.uncompact(Constraint.DEVICE_IDLE | Constraint.DEVICE_CHARGING)) .build(); assertThat(constraintChecker.areConstraintsSatisfied(job)).isTrue(); }
public boolean areConstraintsSatisfied(JobInvocation job) { int jobConstraints = Constraint.compact(job.getConstraints()); return areNetworkConstraintsSatisfied(jobConstraints); }
ConstraintChecker { public boolean areConstraintsSatisfied(JobInvocation job) { int jobConstraints = Constraint.compact(job.getConstraints()); return areNetworkConstraintsSatisfied(jobConstraints); } }
ConstraintChecker { public boolean areConstraintsSatisfied(JobInvocation job) { int jobConstraints = Constraint.compact(job.getConstraints()); return areNetworkConstraintsSatisfied(jobConstraints); } ConstraintChecker(Context context); }
ConstraintChecker { public boolean areConstraintsSatisfied(JobInvocation job) { int jobConstraints = Constraint.compact(job.getConstraints()); return areNetworkConstraintsSatisfied(jobConstraints); } ConstraintChecker(Context context); boolean areConstraintsSatisfied(JobInvocation job); }
ConstraintChecker { public boolean areConstraintsSatisfied(JobInvocation job) { int jobConstraints = Constraint.compact(job.getConstraints()); return areNetworkConstraintsSatisfied(jobConstraints); } ConstraintChecker(Context context); boolean areConstraintsSatisfied(JobInvocation job);  }