mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Remove deprecated CronetDataSource constructors
#minor-release PiperOrigin-RevId: 427216911
This commit is contained in:
parent
0dbe01dc0f
commit
94ee09a916
3 changed files with 12 additions and 127 deletions
|
|
@ -143,8 +143,8 @@
|
||||||
([#9619](https://github.com/google/ExoPlayer/issues/9619)).
|
([#9619](https://github.com/google/ExoPlayer/issues/9619)).
|
||||||
* Transformer:
|
* Transformer:
|
||||||
* The transformer module is no longer included by depending on
|
* The transformer module is no longer included by depending on
|
||||||
`com.google.android.exoplayer:exoplayer`. To continue using
|
`com.google.android.exoplayer:exoplayer`. To continue using transformer,
|
||||||
transformer, add an additional dependency on
|
add an additional dependency on
|
||||||
`com.google.android.exoplayer:exoplayer-transformer`.
|
`com.google.android.exoplayer:exoplayer-transformer`.
|
||||||
* Cast extension
|
* Cast extension
|
||||||
* Fix bug that prevented `CastPlayer` from calling `onIsPlayingChanged`
|
* Fix bug that prevented `CastPlayer` from calling `onIsPlayingChanged`
|
||||||
|
|
@ -186,6 +186,8 @@
|
||||||
constructors. Use the `DefaultRenderersFactory(Context)` constructor,
|
constructors. Use the `DefaultRenderersFactory(Context)` constructor,
|
||||||
`DefaultRenderersFactory#setExtensionRendererMode`, and
|
`DefaultRenderersFactory#setExtensionRendererMode`, and
|
||||||
`DefaultRenderersFactory#setAllowedVideoJoiningTimeMs` instead.
|
`DefaultRenderersFactory#setAllowedVideoJoiningTimeMs` instead.
|
||||||
|
* Remove all public `CronetDataSource` constructors. Use
|
||||||
|
`CronetDataSource.Factory` instead.
|
||||||
* Change the following `IntDefs` to `@Target(TYPE_USE)` only. This may break
|
* Change the following `IntDefs` to `@Target(TYPE_USE)` only. This may break
|
||||||
the compilation of usages in Kotlin, which can be fixed by moving the
|
the compilation of usages in Kotlin, which can be fixed by moving the
|
||||||
annotation to annotate the type (`Int`).
|
annotation to annotate the type (`Int`).
|
||||||
|
|
|
||||||
|
|
@ -430,130 +430,6 @@ public class CronetDataSource extends BaseDataSource implements HttpDataSource {
|
||||||
|
|
||||||
private volatile long currentConnectTimeoutMs;
|
private volatile long currentConnectTimeoutMs;
|
||||||
|
|
||||||
/** @deprecated Use {@link CronetDataSource.Factory} instead. */
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Deprecated
|
|
||||||
public CronetDataSource(CronetEngine cronetEngine, Executor executor) {
|
|
||||||
this(
|
|
||||||
cronetEngine,
|
|
||||||
executor,
|
|
||||||
DEFAULT_CONNECT_TIMEOUT_MILLIS,
|
|
||||||
DEFAULT_READ_TIMEOUT_MILLIS,
|
|
||||||
/* resetTimeoutOnRedirects= */ false,
|
|
||||||
/* defaultRequestProperties= */ null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @deprecated Use {@link CronetDataSource.Factory} instead. */
|
|
||||||
@Deprecated
|
|
||||||
public CronetDataSource(
|
|
||||||
CronetEngine cronetEngine,
|
|
||||||
Executor executor,
|
|
||||||
int connectTimeoutMs,
|
|
||||||
int readTimeoutMs,
|
|
||||||
boolean resetTimeoutOnRedirects,
|
|
||||||
@Nullable RequestProperties defaultRequestProperties) {
|
|
||||||
this(
|
|
||||||
cronetEngine,
|
|
||||||
executor,
|
|
||||||
REQUEST_PRIORITY_MEDIUM,
|
|
||||||
connectTimeoutMs,
|
|
||||||
readTimeoutMs,
|
|
||||||
resetTimeoutOnRedirects,
|
|
||||||
/* handleSetCookieRequests= */ false,
|
|
||||||
/* userAgent= */ null,
|
|
||||||
defaultRequestProperties,
|
|
||||||
/* contentTypePredicate= */ null,
|
|
||||||
/* keepPostFor302Redirects */ false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @deprecated Use {@link CronetDataSource.Factory} instead. */
|
|
||||||
@Deprecated
|
|
||||||
public CronetDataSource(
|
|
||||||
CronetEngine cronetEngine,
|
|
||||||
Executor executor,
|
|
||||||
int connectTimeoutMs,
|
|
||||||
int readTimeoutMs,
|
|
||||||
boolean resetTimeoutOnRedirects,
|
|
||||||
@Nullable RequestProperties defaultRequestProperties,
|
|
||||||
boolean handleSetCookieRequests) {
|
|
||||||
this(
|
|
||||||
cronetEngine,
|
|
||||||
executor,
|
|
||||||
REQUEST_PRIORITY_MEDIUM,
|
|
||||||
connectTimeoutMs,
|
|
||||||
readTimeoutMs,
|
|
||||||
resetTimeoutOnRedirects,
|
|
||||||
handleSetCookieRequests,
|
|
||||||
/* userAgent= */ null,
|
|
||||||
defaultRequestProperties,
|
|
||||||
/* contentTypePredicate= */ null,
|
|
||||||
/* keepPostFor302Redirects */ false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @deprecated Use {@link CronetDataSource.Factory} instead. */
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Deprecated
|
|
||||||
public CronetDataSource(
|
|
||||||
CronetEngine cronetEngine,
|
|
||||||
Executor executor,
|
|
||||||
@Nullable Predicate<String> contentTypePredicate) {
|
|
||||||
this(
|
|
||||||
cronetEngine,
|
|
||||||
executor,
|
|
||||||
contentTypePredicate,
|
|
||||||
DEFAULT_CONNECT_TIMEOUT_MILLIS,
|
|
||||||
DEFAULT_READ_TIMEOUT_MILLIS,
|
|
||||||
/* resetTimeoutOnRedirects= */ false,
|
|
||||||
/* defaultRequestProperties= */ null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @deprecated Use {@link CronetDataSource.Factory} instead. */
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Deprecated
|
|
||||||
public CronetDataSource(
|
|
||||||
CronetEngine cronetEngine,
|
|
||||||
Executor executor,
|
|
||||||
@Nullable Predicate<String> contentTypePredicate,
|
|
||||||
int connectTimeoutMs,
|
|
||||||
int readTimeoutMs,
|
|
||||||
boolean resetTimeoutOnRedirects,
|
|
||||||
@Nullable RequestProperties defaultRequestProperties) {
|
|
||||||
this(
|
|
||||||
cronetEngine,
|
|
||||||
executor,
|
|
||||||
contentTypePredicate,
|
|
||||||
connectTimeoutMs,
|
|
||||||
readTimeoutMs,
|
|
||||||
resetTimeoutOnRedirects,
|
|
||||||
defaultRequestProperties,
|
|
||||||
/* handleSetCookieRequests= */ false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @deprecated Use {@link CronetDataSource.Factory} instead. */
|
|
||||||
@Deprecated
|
|
||||||
public CronetDataSource(
|
|
||||||
CronetEngine cronetEngine,
|
|
||||||
Executor executor,
|
|
||||||
@Nullable Predicate<String> contentTypePredicate,
|
|
||||||
int connectTimeoutMs,
|
|
||||||
int readTimeoutMs,
|
|
||||||
boolean resetTimeoutOnRedirects,
|
|
||||||
@Nullable RequestProperties defaultRequestProperties,
|
|
||||||
boolean handleSetCookieRequests) {
|
|
||||||
this(
|
|
||||||
cronetEngine,
|
|
||||||
executor,
|
|
||||||
REQUEST_PRIORITY_MEDIUM,
|
|
||||||
connectTimeoutMs,
|
|
||||||
readTimeoutMs,
|
|
||||||
resetTimeoutOnRedirects,
|
|
||||||
handleSetCookieRequests,
|
|
||||||
/* userAgent= */ null,
|
|
||||||
defaultRequestProperties,
|
|
||||||
contentTypePredicate,
|
|
||||||
/* keepPostFor302Redirects */ false);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected CronetDataSource(
|
protected CronetDataSource(
|
||||||
CronetEngine cronetEngine,
|
CronetEngine cronetEngine,
|
||||||
Executor executor,
|
Executor executor,
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@
|
||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2.ext.cronet;
|
package com.google.android.exoplayer2.ext.cronet;
|
||||||
|
|
||||||
|
import static org.chromium.net.UrlRequest.Builder.REQUEST_PRIORITY_MEDIUM;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource;
|
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource;
|
||||||
import com.google.android.exoplayer2.upstream.HttpDataSource;
|
import com.google.android.exoplayer2.upstream.HttpDataSource;
|
||||||
|
|
@ -344,10 +346,15 @@ public final class CronetDataSourceFactory extends BaseFactory {
|
||||||
new CronetDataSource(
|
new CronetDataSource(
|
||||||
cronetEngine,
|
cronetEngine,
|
||||||
executor,
|
executor,
|
||||||
|
REQUEST_PRIORITY_MEDIUM,
|
||||||
connectTimeoutMs,
|
connectTimeoutMs,
|
||||||
readTimeoutMs,
|
readTimeoutMs,
|
||||||
resetTimeoutOnRedirects,
|
resetTimeoutOnRedirects,
|
||||||
defaultRequestProperties);
|
/* handleSetCookieRequests= */ false,
|
||||||
|
/* userAgent= */ null,
|
||||||
|
defaultRequestProperties,
|
||||||
|
/* contentTypePredicate= */ null,
|
||||||
|
/* keepPostFor302Redirects */ false);
|
||||||
if (transferListener != null) {
|
if (transferListener != null) {
|
||||||
dataSource.addTransferListener(transferListener);
|
dataSource.addTransferListener(transferListener);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue