@Test public void testCustomCallbackBeforePreparationSetShuffleOrder() throws Exception { ConditionVariable runnableInvoked = new ConditionVariable(); DummyMainThread dummyMainThread = new DummyMainThread(); dummyMainThread.runOnMainThread( () -> mediaSource.setShuffleOrder( new ShuffleOrder.UnshuffledShuffleOrder( 0), new Handler(), runnableInvoked::open)); runnableInvoked.block(MediaSourceTestRunner.TIMEOUT_MS); dummyMainThread.release(); assertThat(runnableInvoked.block(0)).isTrue(); }
public final synchronized void setShuffleOrder(ShuffleOrder shuffleOrder) { setPublicShuffleOrder(shuffleOrder, null, null); }
ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHolder> { public final synchronized void setShuffleOrder(ShuffleOrder shuffleOrder) { setPublicShuffleOrder(shuffleOrder, null, null); } }
ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHolder> { public final synchronized void setShuffleOrder(ShuffleOrder shuffleOrder) { setPublicShuffleOrder(shuffleOrder, null, null); } ConcatenatingMediaSource(MediaSource... mediaSources);  ConcatenatingMediaSource(boolean isAtomic, MediaSource... mediaSources);  ConcatenatingMediaSource(
      boolean isAtomic, ShuffleOrder shuffleOrder, MediaSource... mediaSources); @SuppressWarnings("initialization")  ConcatenatingMediaSource(
      boolean isAtomic,
      boolean useLazyPreparation,
      ShuffleOrder shuffleOrder,
      MediaSource... mediaSources); }
ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHolder> { public final synchronized void setShuffleOrder(ShuffleOrder shuffleOrder) { setPublicShuffleOrder(shuffleOrder, null, null); } ConcatenatingMediaSource(MediaSource... mediaSources);  ConcatenatingMediaSource(boolean isAtomic, MediaSource... mediaSources);  ConcatenatingMediaSource(
      boolean isAtomic, ShuffleOrder shuffleOrder, MediaSource... mediaSources); @SuppressWarnings("initialization")  ConcatenatingMediaSource(
      boolean isAtomic,
      boolean useLazyPreparation,
      ShuffleOrder shuffleOrder,
      MediaSource... mediaSources); final synchronized void addMediaSource(MediaSource mediaSource); final synchronized void addMediaSource(
      MediaSource mediaSource, Handler handler, Runnable onCompletionAction); final synchronized void addMediaSource(int index, MediaSource mediaSource); final synchronized void addMediaSource(
      int index, MediaSource mediaSource, Handler handler, Runnable onCompletionAction); final synchronized void addMediaSources(Collection<MediaSource> mediaSources); final synchronized void addMediaSources(
      Collection<MediaSource> mediaSources, Handler handler, Runnable onCompletionAction); final synchronized void addMediaSources(int index, Collection<MediaSource> mediaSources); final synchronized void addMediaSources(
      int index,
      Collection<MediaSource> mediaSources,
      Handler handler,
      Runnable onCompletionAction); final synchronized void removeMediaSource(int index); final synchronized void removeMediaSource(
      int index, Handler handler, Runnable onCompletionAction); final synchronized void removeMediaSourceRange(int fromIndex, int toIndex); final synchronized void removeMediaSourceRange(
      int fromIndex, int toIndex, Handler handler, Runnable onCompletionAction); final synchronized void moveMediaSource(int currentIndex, int newIndex); final synchronized void moveMediaSource(
      int currentIndex, int newIndex, Handler handler, Runnable onCompletionAction); final synchronized void clear(); final synchronized void clear(Handler handler, Runnable onCompletionAction); final synchronized int getSize(); final synchronized MediaSource getMediaSource(int index); final synchronized void setShuffleOrder(ShuffleOrder shuffleOrder); final synchronized void setShuffleOrder(
      ShuffleOrder shuffleOrder, Handler handler, Runnable onCompletionAction); @Override @Nullable Object getTag(); @Override final synchronized void prepareSourceInternal(
      @Nullable TransferListener mediaTransferListener); @Override @SuppressWarnings("MissingSuperCall") void maybeThrowSourceInfoRefreshError(); @Override final MediaPeriod createPeriod(
      MediaPeriodId id, Allocator allocator, long startPositionUs); @Override final void releasePeriod(MediaPeriod mediaPeriod); @Override final synchronized void releaseSourceInternal(); }
ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHolder> { public final synchronized void setShuffleOrder(ShuffleOrder shuffleOrder) { setPublicShuffleOrder(shuffleOrder, null, null); } ConcatenatingMediaSource(MediaSource... mediaSources);  ConcatenatingMediaSource(boolean isAtomic, MediaSource... mediaSources);  ConcatenatingMediaSource(
      boolean isAtomic, ShuffleOrder shuffleOrder, MediaSource... mediaSources); @SuppressWarnings("initialization")  ConcatenatingMediaSource(
      boolean isAtomic,
      boolean useLazyPreparation,
      ShuffleOrder shuffleOrder,
      MediaSource... mediaSources); final synchronized void addMediaSource(MediaSource mediaSource); final synchronized void addMediaSource(
      MediaSource mediaSource, Handler handler, Runnable onCompletionAction); final synchronized void addMediaSource(int index, MediaSource mediaSource); final synchronized void addMediaSource(
      int index, MediaSource mediaSource, Handler handler, Runnable onCompletionAction); final synchronized void addMediaSources(Collection<MediaSource> mediaSources); final synchronized void addMediaSources(
      Collection<MediaSource> mediaSources, Handler handler, Runnable onCompletionAction); final synchronized void addMediaSources(int index, Collection<MediaSource> mediaSources); final synchronized void addMediaSources(
      int index,
      Collection<MediaSource> mediaSources,
      Handler handler,
      Runnable onCompletionAction); final synchronized void removeMediaSource(int index); final synchronized void removeMediaSource(
      int index, Handler handler, Runnable onCompletionAction); final synchronized void removeMediaSourceRange(int fromIndex, int toIndex); final synchronized void removeMediaSourceRange(
      int fromIndex, int toIndex, Handler handler, Runnable onCompletionAction); final synchronized void moveMediaSource(int currentIndex, int newIndex); final synchronized void moveMediaSource(
      int currentIndex, int newIndex, Handler handler, Runnable onCompletionAction); final synchronized void clear(); final synchronized void clear(Handler handler, Runnable onCompletionAction); final synchronized int getSize(); final synchronized MediaSource getMediaSource(int index); final synchronized void setShuffleOrder(ShuffleOrder shuffleOrder); final synchronized void setShuffleOrder(
      ShuffleOrder shuffleOrder, Handler handler, Runnable onCompletionAction); @Override @Nullable Object getTag(); @Override final synchronized void prepareSourceInternal(
      @Nullable TransferListener mediaTransferListener); @Override @SuppressWarnings("MissingSuperCall") void maybeThrowSourceInfoRefreshError(); @Override final MediaPeriod createPeriod(
      MediaPeriodId id, Allocator allocator, long startPositionUs); @Override final void releasePeriod(MediaPeriod mediaPeriod); @Override final synchronized void releaseSourceInternal();  }