Commit 62720858 by bachinger Committed by Oliver Woodman

Make CronetDataSourceFactory an inner class of CronetDataSource

#exofixit

PiperOrigin-RevId: 348444280
parent df0b74e4
......@@ -73,6 +73,8 @@
([#1807](https://github.com/google/ExoPlayer/issues/1807)).
* OkHttp extension:
* Add `OkHttpDataSource.Factory` and deprecate `OkHttpDataSourceFactory`.
* Cronet extension:
* Add `CronetDataSource.Factory` and deprecate `CronetDataSourceFactory`.
* Media2 extension
* Make media2-extension depend on AndroidX media2:media2-session:1.1.0 to
fix a deadlock while creating PlaybackStateCompat internally.
......
......@@ -20,7 +20,7 @@ import com.google.android.exoplayer2.DefaultRenderersFactory;
import com.google.android.exoplayer2.RenderersFactory;
import com.google.android.exoplayer2.database.DatabaseProvider;
import com.google.android.exoplayer2.database.ExoDatabaseProvider;
import com.google.android.exoplayer2.ext.cronet.CronetDataSourceFactory;
import com.google.android.exoplayer2.ext.cronet.CronetDataSource;
import com.google.android.exoplayer2.ext.cronet.CronetEngineWrapper;
import com.google.android.exoplayer2.offline.ActionFileUpgradeUtil;
import com.google.android.exoplayer2.offline.DefaultDownloadIndex;
......@@ -81,7 +81,7 @@ public final class DemoUtil {
context = context.getApplicationContext();
CronetEngineWrapper cronetEngineWrapper = new CronetEngineWrapper(context);
httpDataSourceFactory =
new CronetDataSourceFactory(cronetEngineWrapper, Executors.newSingleThreadExecutor());
new CronetDataSource.Factory(cronetEngineWrapper, Executors.newSingleThreadExecutor());
}
return httpDataSourceFactory;
}
......
......@@ -21,6 +21,7 @@ dependencies {
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
testImplementation project(modulePrefix + 'library')
testImplementation project(modulePrefix + 'testutils')
testImplementation 'com.squareup.okhttp3:mockwebserver:' + mockWebServerVersion
testImplementation 'org.robolectric:robolectric:' + robolectricVersion
}
......
......@@ -21,14 +21,14 @@ import androidx.annotation.Nullable;
import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory;
import com.google.android.exoplayer2.upstream.HttpDataSource;
import com.google.android.exoplayer2.upstream.HttpDataSource.BaseFactory;
import com.google.android.exoplayer2.upstream.HttpDataSource.Factory;
import com.google.android.exoplayer2.upstream.TransferListener;
import java.util.concurrent.Executor;
import org.chromium.net.CronetEngine;
/**
* A {@link Factory} that produces {@link CronetDataSource}.
*/
/** @deprecated Use {@link CronetDataSource.Factory} instead. */
// Uses deprecated DefaultHttpDataSourceFactory
@SuppressWarnings("deprecation")
@Deprecated
public final class CronetDataSourceFactory extends BaseFactory {
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment