tree/testutils/src/main/java/com/google/android/exoplayer2/testutil/TestDownloadManagerListener.java
public void blockUntilTasksComplete() throws InterruptedException {
    synchronized (this) {
      downloadFinishedCondition = new CountDownLatch(1);
    }
    dummyMainThread.runOnMainThread(
        () -> {
          if (downloadManager.isIdle()) {
            Util.castNonNull(downloadFinishedCondition).countDown();
          }
        });
    assertThat(downloadFinishedCondition.await(timeoutMs, TimeUnit.MILLISECONDS)).isTrue();
  }
/** Blocks until all remove and download tasks are complete. Task errors are ignored. */
Blocks until all remove and download tasks are complete. Task errors are ignored.
Blocks until all remove and download tasks are complete . Task errors are ignored .
public void blockUntilTasksComplete() throws InterruptedException {
    synchronized (this) {
      downloadFinishedCondition = new CountDownLatch(1);
    }
    dummyMainThread.runOnMainThread(
        () -> {
          if (downloadManager.isIdle()) {
            Util.castNonNull(downloadFinishedCondition).countDown();
          }
        });
    assertThat(downloadFinishedCondition.await(timeoutMs, TimeUnit.MILLISECONDS)).isTrue();
  }
public void blockUntilTasksComplete ( ) throws InterruptedException { synchronized ( this ) { downloadFinishedCondition = new CountDownLatch ( 1 ) ; } dummyMainThread . runOnMainThread ( ( ) -> { if ( downloadManager . isIdle ( ) ) { Util . castNonNull ( downloadFinishedCondition ) . countDown ( ) ; } } ) ; assertThat ( downloadFinishedCondition . await ( timeoutMs , TimeUnit . MILLISECONDS ) ) . isTrue ( ) ; }
Blocks until all remove and download tasks are complete.
Blocks until all remove and download tasks are complete .