Skip to content

Commit

Permalink
Rollback of 91633e6
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 650620012
  • Loading branch information
icbaker authored and copybara-github committed Jul 9, 2024
1 parent 60359c1 commit 00d1e70
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
13 changes: 13 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
* Add override for `SimpleBasePlayer.State.Builder.setPlaylist()` to
directly specify a `Timeline` and current `Tracks` and `Metadata`
instead of building a playlist structure.
* Upgrade `androidx.annotation:annotation` dependency to `1.6.0`. This may
cause `duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations`
and similar errors for non-Kotlin apps that also depend on other libs
like `androidx.appcompat:appcompat`. This is due to
[incomplete version constraints in the Kotlin standard library](https://youtrack.jetbrains.com/issue/KT-55297).
Apps can resolve this by upgrading their
[Kotlin Gradle Plugin](https://kotlinlang.org/docs/gradle-configure-project.html#apply-the-plugin)
to at least version `1.9.20` or using the workaround described in
https://issuetracker.google.com/278545487.
* ExoPlayer:
* `MediaCodecRenderer.onProcessedStreamChange()` can now be called for
every media item. Previously it was not called for the first one. Use
Expand All @@ -28,6 +37,10 @@
* Extractors:
* Allow `Mp4Extractor` and `FragmentedMp4Extractor` to identify H264
samples that are not used as reference by subsequent samples.
* DataSource:
* Update `HttpEngineDataSource` to allow use starting at version S
extension 7 instead of API level 34
([#1262](https://github.com/androidx/media/issues/1262)).
* Audio:
* Video:
* Text:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.4'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20'
}
}
allprojects {
Expand Down
3 changes: 1 addition & 2 deletions constants.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ project.ext {
errorProneVersion = '2.18.0'
jsr305Version = '3.0.2'
kotlinAnnotationsVersion = '1.9.0'
// Updating this to 1.4.0+ will import Kotlin stdlib [internal ref: b/277891049].
androidxAnnotationVersion = '1.3.0'
androidxAnnotationVersion = '1.6.0'
androidxAnnotationExperimentalVersion = '1.3.1'
androidxAppCompatVersion = '1.6.1'
androidxCollectionVersion = '1.2.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import android.content.Context;
import android.net.http.HttpEngine;
import android.os.Build;
import android.os.ext.SdkExtensions;
import androidx.annotation.OptIn;
import androidx.media3.database.DatabaseProvider;
import androidx.media3.database.StandaloneDatabaseProvider;
Expand Down Expand Up @@ -106,7 +107,8 @@ public static synchronized DataSource.Factory getHttpDataSourceFactory(Context c
return httpDataSourceFactory;
}
context = context.getApplicationContext();
if (Build.VERSION.SDK_INT >= 34) {
if (Build.VERSION.SDK_INT >= 30
&& SdkExtensions.getExtensionVersion(Build.VERSION_CODES.S) >= 7) {
HttpEngine httpEngine = new HttpEngine.Builder(context).build();
httpDataSourceFactory =
new HttpEngineDataSource.Factory(httpEngine, Executors.newSingleThreadExecutor());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@

import android.net.http.UploadDataProvider;
import android.net.http.UploadDataSink;
import androidx.annotation.RequiresApi;
import android.os.Build;
import androidx.annotation.RequiresExtension;
import java.io.IOException;
import java.nio.ByteBuffer;

/** A {@link UploadDataProvider} implementation that provides data from a {@code byte[]}. */
@RequiresApi(34)
@RequiresExtension(extension = Build.VERSION_CODES.S, version = 7)
/* package */ final class ByteArrayUploadDataProvider extends UploadDataProvider {

private final byte[] data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
import android.net.http.UrlRequest;
import android.net.http.UrlRequest.Status;
import android.net.http.UrlResponseInfo;
import android.os.Build;
import android.text.TextUtils;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.annotation.RequiresExtension;
import androidx.annotation.VisibleForTesting;
import androidx.media3.common.C;
import androidx.media3.common.PlaybackException;
Expand Down Expand Up @@ -65,7 +66,7 @@
* priority) the {@code dataSpec}, {@link #setRequestProperty} and the default parameters used to
* construct the instance.
*/
@RequiresApi(34)
@RequiresExtension(extension = Build.VERSION_CODES.S, version = 7)
@UnstableApi
public final class HttpEngineDataSource extends BaseDataSource implements HttpDataSource {

Expand Down

0 comments on commit 00d1e70

Please sign in to comment.