@Override
    public boolean close() {
      if (mDataSourceLazy) {
        ensureDataSourceInitialized();
      }

      ArrayList<DataSource<T>> dataSources;
      synchronized (IncreasingQualityDataSource.this) {
        // it's fine to call {@code super.close()} within a synchronized block because we don't
        // implement {@link #closeResult()}, but perform result closing ourselves.
        if (!super.close()) {
          return false;
        }
        dataSources = mDataSources;
        mDataSources = null;
      }
      if (dataSources != null) {
        for (int i = 0; i < dataSources.size(); i++) {
          closeSafely(dataSources.get(i));
        }
      }
      return true;
    }
Creates a new data source supplier with increasing-quality strategy with optional lazy state
creation.

<p>Note: for performance reasons the list doesn't get cloned, so the caller of this method
should not modify the list once passed in here.

@param dataSourceSuppliers list of underlying suppliers
@param dataSourceLazy if true, the state of data source would be created only if necessary
fbcore/src/main/java/com/facebook/datasource/IncreasingQualityDataSourceSupplier.java