Lines Matching refs:ji

47         JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent)  in testBackoffCriteria()  local
50 assertEquals(12345, ji.getInitialBackoffMillis()); in testBackoffCriteria()
51 assertEquals(JobInfo.BACKOFF_POLICY_LINEAR, ji.getBackoffPolicy()); in testBackoffCriteria()
53 mJobScheduler.schedule(ji); in testBackoffCriteria()
55 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testBackoffCriteria()
58 assertEquals(54321, ji.getInitialBackoffMillis()); in testBackoffCriteria()
59 assertEquals(JobInfo.BACKOFF_POLICY_EXPONENTIAL, ji.getBackoffPolicy()); in testBackoffCriteria()
61 mJobScheduler.schedule(ji); in testBackoffCriteria()
65 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testBatteryNotLow() local
68 assertTrue(ji.isRequireBatteryNotLow()); in testBatteryNotLow()
70 mJobScheduler.schedule(ji); in testBatteryNotLow()
72 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testBatteryNotLow()
75 assertFalse(ji.isRequireBatteryNotLow()); in testBatteryNotLow()
77 mJobScheduler.schedule(ji); in testBatteryNotLow()
81 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testCharging() local
84 assertTrue(ji.isRequireCharging()); in testCharging()
86 mJobScheduler.schedule(ji); in testCharging()
88 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testCharging()
91 assertFalse(ji.isRequireCharging()); in testCharging()
93 mJobScheduler.schedule(ji); in testCharging()
98 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testClipData() local
101 assertEquals(clipData, ji.getClipData()); in testClipData()
102 assertEquals(Intent.FLAG_GRANT_READ_URI_PERMISSION, ji.getClipGrantFlags()); in testClipData()
104 mJobScheduler.schedule(ji); in testClipData()
106 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testClipData()
109 assertNull(ji.getClipData()); in testClipData()
110 assertEquals(0, ji.getClipGrantFlags()); in testClipData()
112 mJobScheduler.schedule(ji); in testClipData()
116 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testDeviceIdle() local
119 assertTrue(ji.isRequireDeviceIdle()); in testDeviceIdle()
121 mJobScheduler.schedule(ji); in testDeviceIdle()
123 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testDeviceIdle()
126 assertFalse(ji.isRequireDeviceIdle()); in testDeviceIdle()
128 mJobScheduler.schedule(ji); in testDeviceIdle()
138 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testEstimatedNetworkBytes() local
142 assertEquals(500, ji.getEstimatedNetworkDownloadBytes()); in testEstimatedNetworkBytes()
143 assertEquals(1000, ji.getEstimatedNetworkUploadBytes()); in testEstimatedNetworkBytes()
145 mJobScheduler.schedule(ji); in testEstimatedNetworkBytes()
151 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testExtras() local
155 final PersistableBundle extras = ji.getExtras(); in testExtras()
160 mJobScheduler.schedule(ji); in testExtras()
165 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testExpeditedJob() local
171 assertTrue(ji.isExpedited()); in testExpeditedJob()
173 mJobScheduler.schedule(ji); in testExpeditedJob()
221 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testImportantWhileForeground() local
223 assertFalse(ji.isImportantWhileForeground()); in testImportantWhileForeground()
225 mJobScheduler.schedule(ji); in testImportantWhileForeground()
227 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testImportantWhileForeground()
230 assertTrue(ji.isImportantWhileForeground()); in testImportantWhileForeground()
232 mJobScheduler.schedule(ji); in testImportantWhileForeground()
234 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testImportantWhileForeground()
237 assertFalse(ji.isImportantWhileForeground()); in testImportantWhileForeground()
239 mJobScheduler.schedule(ji); in testImportantWhileForeground()
243 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testMinimumLatency() local
246 assertEquals(1337, ji.getMinLatencyMillis()); in testMinimumLatency()
248 mJobScheduler.schedule(ji); in testMinimumLatency()
252 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testOverrideDeadline() local
256 assertEquals(7357, ji.getMaxExecutionDelayMillis()); in testOverrideDeadline()
260 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testPeriodic() local
263 assertTrue(ji.isPeriodic()); in testPeriodic()
264 assertEquals(60 * 60 * 1000L, ji.getIntervalMillis()); in testPeriodic()
265 assertEquals(60 * 60 * 1000L, ji.getFlexMillis()); in testPeriodic()
267 mJobScheduler.schedule(ji); in testPeriodic()
269 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testPeriodic()
272 assertTrue(ji.isPeriodic()); in testPeriodic()
273 assertEquals(120 * 60 * 1000L, ji.getIntervalMillis()); in testPeriodic()
274 assertEquals(20 * 60 * 1000L, ji.getFlexMillis()); in testPeriodic()
276 mJobScheduler.schedule(ji); in testPeriodic()
281 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testPersisted() local
283 assertFalse(ji.isPersisted()); in testPersisted()
285 mJobScheduler.schedule(ji); in testPersisted()
287 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testPersisted()
290 assertTrue(ji.isPersisted()); in testPersisted()
292 mJobScheduler.schedule(ji); in testPersisted()
294 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testPersisted()
297 assertFalse(ji.isPersisted()); in testPersisted()
299 mJobScheduler.schedule(ji); in testPersisted()
304 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testPrefetch() local
306 assertFalse(ji.isPrefetch()); in testPrefetch()
308 mJobScheduler.schedule(ji); in testPrefetch()
310 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testPrefetch()
313 assertTrue(ji.isPrefetch()); in testPrefetch()
315 mJobScheduler.schedule(ji); in testPrefetch()
317 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testPrefetch()
320 assertFalse(ji.isPrefetch()); in testPrefetch()
322 mJobScheduler.schedule(ji); in testPrefetch()
330 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testRequiredNetwork() local
333 assertEquals(nr, ji.getRequiredNetwork()); in testRequiredNetwork()
335 mJobScheduler.schedule(ji); in testRequiredNetwork()
337 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testRequiredNetwork()
340 assertNull(ji.getRequiredNetwork()); in testRequiredNetwork()
342 mJobScheduler.schedule(ji); in testRequiredNetwork()
348 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testRequiredNetworkType() local
350 assertEquals(JobInfo.NETWORK_TYPE_NONE, ji.getNetworkType()); in testRequiredNetworkType()
352 mJobScheduler.schedule(ji); in testRequiredNetworkType()
354 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testRequiredNetworkType()
357 assertEquals(JobInfo.NETWORK_TYPE_ANY, ji.getNetworkType()); in testRequiredNetworkType()
359 mJobScheduler.schedule(ji); in testRequiredNetworkType()
361 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testRequiredNetworkType()
364 assertEquals(JobInfo.NETWORK_TYPE_UNMETERED, ji.getNetworkType()); in testRequiredNetworkType()
366 mJobScheduler.schedule(ji); in testRequiredNetworkType()
368 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testRequiredNetworkType()
371 assertEquals(JobInfo.NETWORK_TYPE_NOT_ROAMING, ji.getNetworkType()); in testRequiredNetworkType()
373 mJobScheduler.schedule(ji); in testRequiredNetworkType()
375 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testRequiredNetworkType()
378 assertEquals(JobInfo.NETWORK_TYPE_CELLULAR, ji.getNetworkType()); in testRequiredNetworkType()
380 mJobScheduler.schedule(ji); in testRequiredNetworkType()
382 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testRequiredNetworkType()
385 assertEquals(JobInfo.NETWORK_TYPE_NONE, ji.getNetworkType()); in testRequiredNetworkType()
387 mJobScheduler.schedule(ji); in testRequiredNetworkType()
391 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testStorageNotLow() local
394 assertTrue(ji.isRequireStorageNotLow()); in testStorageNotLow()
396 mJobScheduler.schedule(ji); in testStorageNotLow()
398 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testStorageNotLow()
401 assertFalse(ji.isRequireStorageNotLow()); in testStorageNotLow()
403 mJobScheduler.schedule(ji); in testStorageNotLow()
414 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testTransientExtras() local
417 assertEquals(b.size(), ji.getTransientExtras().size()); in testTransientExtras()
419 assertEquals(b.get(key), ji.getTransientExtras().get(key)); in testTransientExtras()
422 mJobScheduler.schedule(ji); in testTransientExtras()
426 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testTriggerContentMaxDelay() local
429 assertEquals(1337, ji.getTriggerContentMaxDelay()); in testTriggerContentMaxDelay()
431 mJobScheduler.schedule(ji); in testTriggerContentMaxDelay()
435 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testTriggerContentUpdateDelay() local
438 assertEquals(1337, ji.getTriggerContentUpdateDelay()); in testTriggerContentUpdateDelay()
440 mJobScheduler.schedule(ji); in testTriggerContentUpdateDelay()
449 JobInfo ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testTriggerContentUri() local
452 assertEquals(1, ji.getTriggerContentUris().length); in testTriggerContentUri()
453 assertEquals(tcu, ji.getTriggerContentUris()[0]); in testTriggerContentUri()
455 mJobScheduler.schedule(ji); in testTriggerContentUri()
461 ji = new JobInfo.Builder(JOB_ID, kJobServiceComponent) in testTriggerContentUri()
465 assertEquals(2, ji.getTriggerContentUris().length); in testTriggerContentUri()
466 assertEquals(tcu, ji.getTriggerContentUris()[0]); in testTriggerContentUri()
467 assertEquals(tcu2, ji.getTriggerContentUris()[1]); in testTriggerContentUri()
469 mJobScheduler.schedule(ji); in testTriggerContentUri()