Make Downloaders open source

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166486294
This commit is contained in:
eguven 2017-08-25 09:35:10 -07:00 committed by Oliver Woodman
parent 30b31b5679
commit cc58b515b7
10 changed files with 0 additions and 21 deletions

View File

@ -15,11 +15,9 @@
*/
package com.google.android.exoplayer2.offline;
import com.google.android.exoplayer2.util.ClosedSource;
import java.io.IOException;
/** Thrown on an error during downloading. */
@ClosedSource(reason = "Not ready yet")
public final class DownloadException extends IOException {
/** @param message The message for the exception. */

View File

@ -17,13 +17,11 @@ package com.google.android.exoplayer2.offline;
import android.support.annotation.Nullable;
import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.util.ClosedSource;
import java.io.IOException;
/**
* An interface for stream downloaders.
*/
@ClosedSource(reason = "Not ready yet")
public interface Downloader {
/**

View File

@ -27,11 +27,9 @@ import com.google.android.exoplayer2.upstream.cache.Cache;
import com.google.android.exoplayer2.upstream.cache.CacheDataSink;
import com.google.android.exoplayer2.upstream.cache.CacheDataSource;
import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.util.ClosedSource;
import com.google.android.exoplayer2.util.PriorityTaskManager;
/** A helper class that holds necessary parameters for {@link Downloader} construction. */
@ClosedSource(reason = "Not ready yet")
public final class DownloaderConstructorHelper {
private final Cache cache;

View File

@ -23,14 +23,12 @@ import com.google.android.exoplayer2.upstream.cache.Cache;
import com.google.android.exoplayer2.upstream.cache.CacheDataSource;
import com.google.android.exoplayer2.upstream.cache.CacheUtil;
import com.google.android.exoplayer2.upstream.cache.CacheUtil.CachingCounters;
import com.google.android.exoplayer2.util.ClosedSource;
import com.google.android.exoplayer2.util.PriorityTaskManager;
import java.io.IOException;
/**
* A downloader for progressive media streams.
*/
@ClosedSource(reason = "Not ready yet")
public final class ProgressiveDownloader implements Downloader {
private static final int BUFFER_SIZE_BYTES = 128 * 1024;

View File

@ -25,7 +25,6 @@ import com.google.android.exoplayer2.upstream.cache.Cache;
import com.google.android.exoplayer2.upstream.cache.CacheDataSource;
import com.google.android.exoplayer2.upstream.cache.CacheUtil;
import com.google.android.exoplayer2.upstream.cache.CacheUtil.CachingCounters;
import com.google.android.exoplayer2.util.ClosedSource;
import com.google.android.exoplayer2.util.PriorityTaskManager;
import java.io.IOException;
import java.util.Collections;
@ -40,7 +39,6 @@ import java.util.List;
* @param <M> The type of the manifest object.
* @param <K> The type of the representation key object.
*/
@ClosedSource(reason = "Not ready yet")
public abstract class SegmentDownloader<M, K> implements Downloader {
/** Smallest unit of content to be downloaded. */

View File

@ -15,12 +15,9 @@
*/
package com.google.android.exoplayer2.source.hls.offline;
import com.google.android.exoplayer2.util.ClosedSource;
/**
* Data for HLS downloading tests.
*/
@ClosedSource(reason = "Not ready yet")
/* package */ interface HlsDownloadTestData {
String MASTER_PLAYLIST_URI = "test.m3u8";

View File

@ -39,12 +39,10 @@ import com.google.android.exoplayer2.testutil.FakeDataSet;
import com.google.android.exoplayer2.testutil.FakeDataSource.Factory;
import com.google.android.exoplayer2.upstream.cache.NoOpCacheEvictor;
import com.google.android.exoplayer2.upstream.cache.SimpleCache;
import com.google.android.exoplayer2.util.ClosedSource;
import com.google.android.exoplayer2.util.Util;
import java.io.File;
/** Unit tests for {@link HlsDownloader}. */
@ClosedSource(reason = "Not ready yet")
public class HlsDownloaderTest extends InstrumentationTestCase {
private SimpleCache cache;

View File

@ -27,7 +27,6 @@ import com.google.android.exoplayer2.source.hls.playlist.HlsPlaylistParser;
import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.upstream.DataSpec;
import com.google.android.exoplayer2.upstream.ParsingLoadable;
import com.google.android.exoplayer2.util.ClosedSource;
import com.google.android.exoplayer2.util.UriUtil;
import java.io.IOException;
import java.util.ArrayList;
@ -41,7 +40,6 @@ import java.util.List;
* #selectRepresentations(Object[])}. As key, string form of the rendition's url is used. The urls
* can be absolute or relative to the master playlist url.
*/
@ClosedSource(reason = "Not ready yet")
public final class HlsDownloader extends SegmentDownloader<HlsMasterPlaylist, String> {
/**

View File

@ -26,7 +26,6 @@ import com.google.android.exoplayer2.source.smoothstreaming.manifest.TrackKey;
import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.upstream.DataSpec;
import com.google.android.exoplayer2.upstream.ParsingLoadable;
import com.google.android.exoplayer2.util.ClosedSource;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@ -60,7 +59,6 @@ import java.util.List;
* new CacheDataSource(cache, factory.createDataSource(), CacheDataSource.FLAG_BLOCK_ON_CACHE);}
* </pre>
*/
@ClosedSource(reason = "Not ready yet")
public final class SsDownloader extends SegmentDownloader<SsManifest, TrackKey> {
/**

View File

@ -32,7 +32,6 @@ import com.google.android.exoplayer2.upstream.cache.CacheDataSource;
import com.google.android.exoplayer2.upstream.cache.CacheDataSourceFactory;
import com.google.android.exoplayer2.upstream.cache.NoOpCacheEvictor;
import com.google.android.exoplayer2.upstream.cache.SimpleCache;
import com.google.android.exoplayer2.util.ClosedSource;
import com.google.android.exoplayer2.util.Util;
import java.io.File;
import java.io.IOException;
@ -43,7 +42,6 @@ import java.util.List;
/**
* Tests downloaded DASH playbacks.
*/
@ClosedSource(reason = "Not ready yet")
public final class DashDownloadTest extends ActivityInstrumentationTestCase2<HostActivity> {
private static final String TAG = "DashDownloadTest";