Searched refs:jobPolicy (Results 1 – 9 of 9) sorted by relevance
47 JobInfo.Builder builder, @Nullable JobPolicy jobPolicy) { in applyPolicyToJobInfo() argument48 if (jobPolicy == null) { in applyPolicyToJobInfo()52 if (jobPolicy.hasNetworkType()) { in applyPolicyToJobInfo()53 builder.setRequiredNetworkType(convertNetworkType(jobPolicy.getNetworkType())); in applyPolicyToJobInfo()56 if (jobPolicy.hasBatteryType()) { in applyPolicyToJobInfo()57 setBatteryConstraint(builder, jobPolicy); in applyPolicyToJobInfo()60 if (jobPolicy.hasRequireDeviceIdle()) { in applyPolicyToJobInfo()61 builder.setRequiresDeviceIdle(jobPolicy.getRequireDeviceIdle()); in applyPolicyToJobInfo()64 if (jobPolicy.hasRequireStorageNotLow()) { in applyPolicyToJobInfo()65 builder.setRequiresStorageNotLow(jobPolicy.getRequireStorageNotLow()); in applyPolicyToJobInfo()[all …]
42 JobPolicy jobPolicy, in JobSpec() argument46 mJobPolicy = Objects.requireNonNull(jobPolicy); in JobSpec()130 public Builder(JobPolicy jobPolicy) { in Builder() argument131 mJobPolicy = Objects.requireNonNull(jobPolicy); in Builder()
65 JobPolicy jobPolicy = JobPolicy.newBuilder().setNetworkType(overridingValue).build(); in testApplyPolicyToJobInfo_network() local66 assertThat(applyPolicyToJobInfo(builder, jobPolicy).getNetworkType()) in testApplyPolicyToJobInfo_network()75 JobPolicy jobPolicy = JobPolicy.newBuilder().setBatteryType(overridingValue).build(); in testApplyPolicyToJobInfo_battery_charging() local76 assertThat(applyPolicyToJobInfo(builder, jobPolicy).isRequireCharging()).isEqualTo(true); in testApplyPolicyToJobInfo_battery_charging()79 jobPolicy = JobPolicy.newBuilder().setBatteryType(overridingValue).build(); in testApplyPolicyToJobInfo_battery_charging()80 assertThat(applyPolicyToJobInfo(builder, jobPolicy).isRequireCharging()).isEqualTo(false); in testApplyPolicyToJobInfo_battery_charging()83 jobPolicy = JobPolicy.newBuilder().setBatteryType(overridingValue).build(); in testApplyPolicyToJobInfo_battery_charging()84 assertThat(applyPolicyToJobInfo(builder, jobPolicy).isRequireCharging()).isEqualTo(false); in testApplyPolicyToJobInfo_battery_charging()92 JobPolicy jobPolicy = JobPolicy.newBuilder().setBatteryType(overridingValue).build(); in testApplyPolicyToJobInfo_battery_notLow() local93 assertThat(applyPolicyToJobInfo(builder, jobPolicy).isRequireBatteryNotLow()) in testApplyPolicyToJobInfo_battery_notLow()[all …]
91 JobPolicy jobPolicy = in createDefaultJobSpec() local103 return new JobSpec.Builder(jobPolicy).build(); in createDefaultJobSpec()
100 JobPolicy jobPolicy = in createDefaultJobSpec() local116 return new JobSpec.Builder(jobPolicy).setBackoffPolicy(backoffPolicy).build(); in createDefaultJobSpec()
114 JobPolicy jobPolicy = in createDefaultJobSpec() local132 return new JobSpec.Builder(jobPolicy).setBackoffPolicy(backoffPolicy).build(); in createDefaultJobSpec()
158 JobPolicy jobPolicy = in createDefaultJobSpec() local172 return new JobSpec.Builder(jobPolicy).build(); in createDefaultJobSpec()
113 JobPolicy jobPolicy = in createDefaultJobSpec() local128 return new JobSpec.Builder(jobPolicy).setBackoffPolicy(backoffPolicy).build(); in createDefaultJobSpec()
200 JobPolicy jobPolicy = in createJobSpec() local212 return new JobSpec.Builder(jobPolicy).setExtras(extras).build(); in createJobSpec()