Lines Matching refs:positions

114             PlaybackSeekDataProvider provider, long[] positions) {
116 int lastThumbIndex = Math.min(lastHeroIndex + (mNumbThumbs / 2), positions.length - 1);
135 void verifyAtHeroIndex(long[] positions, int heroIndex) {
136 verifyAtHeroIndex(positions, heroIndex, null);
139 void verifyAtHeroIndex(long[] positions, int heroIndex, Bitmap[] thumbs) {
140 assertEquals(positions[heroIndex], mGlue.getControlsRow().getCurrentPosition());
144 int end = Math.min(positions.length - 1, mViewHolder.mThumbHeroIndex + mNumbThumbs / 2);
331 final long[] positions = provider.getSeekPositions();
337 verifyAtHeroIndex(positions, 1);
339 verifyAtHeroIndex(positions, 2);
342 Mockito.verify(mImpl).seekTo(positions[2]);
344 verifyGetThumbCalls(1, 2, provider, positions);
359 final long[] positions = provider.getSeekPositions();
373 verifyAtHeroIndex(positions, 2);
376 verify(mImpl).seekTo(positions[2]);
382 verifyAtHeroIndex(positions, 0);
401 final long[] positions = provider.getSeekPositions();
415 verifyAtHeroIndex(positions, 2);
418 verify(mImpl).seekTo(positions[2]);
424 verifyAtHeroIndex(positions, 0);
427 verify(mImpl).seekTo(positions[2]);
443 final long[] positions = provider.getSeekPositions();
448 int insertPosition = -1 - Arrays.binarySearch(positions, 4489L);
450 verifyAtHeroIndex(positions, insertPosition + 4);
451 verifyGetThumbCalls(insertPosition, insertPosition + 4, provider, positions);
454 verifyAtHeroIndex(positions, insertPosition - 1);
469 final long[] positions = provider.getSeekPositions();
475 verifyAtHeroIndex(positions, 1);
478 verifyAtHeroIndex(positions, 2);
482 verifyGetThumbCalls(1, 2, provider, positions);
489 final long[] positions = provider.getSeekPositions();
493 when(mImpl.getCurrentPosition()).thenReturn((positions[0] + positions[1]) / 2);
505 verifyAtHeroIndex(positions, 1);
506 verifyGetThumbCalls(1, 1, provider, positions);
513 final long[] positions = provider.getSeekPositions();
514 assertTrue(positions[0] == 0);
518 when(mImpl.getCurrentPosition()).thenReturn((positions[0] + positions[1]) / 2);
530 verifyAtHeroIndex(positions, 0);
531 verifyGetThumbCalls(0, 0, provider, positions);
538 final long[] positions = provider.getSeekPositions();
539 assertTrue(positions[0] > 0);
543 when(mImpl.getCurrentPosition()).thenReturn((positions[0] + positions[1]) / 2);
555 verifyAtHeroIndex(positions, 0);
560 verifyGetThumbCalls(0, 0, provider, positions);
567 final long[] positions = provider.getSeekPositions();
568 assertTrue(positions[0] > 0);
572 when(mImpl.getCurrentPosition()).thenReturn(positions[0] / 2);
586 verifyAtHeroIndex(positions, 0);
587 verifyGetThumbCalls(0, 0, provider, positions);
594 final long[] positions = provider.getSeekPositions();
595 assertTrue(positions[0] > 0);
599 when(mImpl.getCurrentPosition()).thenReturn(positions[0] / 2);
611 verifyAtHeroIndex(positions, 0);
614 verifyGetThumbCalls(0, 0, provider, positions);
621 final long[] positions = provider.getSeekPositions();
625 when(mImpl.getCurrentPosition()).thenReturn((positions[positions.length - 2]
626 + positions[positions.length - 1]) / 2);
638 verifyAtHeroIndex(positions, positions.length - 1);
640 verifyAtHeroIndex(positions, positions.length - 2);
642 verifyAtHeroIndex(positions, positions.length - 1);
644 verifyAtHeroIndexWithDifferentPosition(20000L, positions.length - 1);
646 verifyAtHeroIndexWithDifferentPosition(20000L, positions.length - 1);
647 verifyGetThumbCalls(positions.length - 2, positions.length - 1, provider, positions);
654 final long[] positions = provider.getSeekPositions();
658 when(mImpl.getCurrentPosition()).thenReturn(positions[positions.length - 1] + 100);
670 verifyAtHeroIndexWithDifferentPosition(20000L, positions.length - 1);
672 verifyAtHeroIndex(positions, positions.length - 1);
673 verifyGetThumbCalls(positions.length - 1, positions.length - 1, provider, positions);
680 final long[] positions = provider.getSeekPositions();
684 when(mImpl.getCurrentPosition()).thenReturn(positions[positions.length - 1] + 100);
696 verifyAtHeroIndex(positions, positions.length - 1);
698 verifyAtHeroIndexWithDifferentPosition(20000L, positions.length - 1);
699 verifyGetThumbCalls(positions.length - 1, positions.length - 1, provider, positions);
722 final long[] positions = provider.getSeekPositions();
728 verifyAtHeroIndex(positions, 1, thumbs);