197 Commits

Author SHA1 Message Date
tonihei
2ac5d8f1af Make FakeClock Espresso and Compose UI test compatible
FakeClock currently doesn't work well with Espresso and Compose UI
tests because view interactions in both frameworks intentionally idle
the main looper to handle pending UI effects. However, this also
advances playback progress even though we want to deterministically
trigger progress from the test itself.

To solve this problem, we can detect the idling Robolectric call and
postpone any further updates until we leave this state.

PiperOrigin-RevId: 541831050
2023-06-20 14:03:06 +01:00
tonihei
51fb72b00d Replace deprecated NullableType from checkerframework with our own one
The existing NullableType has been deprecated 5 years ago and causes
crashes in Kotlin apps because Kotlin doesn't recognize this annotation
as a nullable type annotation.

While we can't align on a single @Nullable annotation yet, we can at
least replace this one by JSR305's @Nonnull(MAYBE) as it fulfils all
requirements, including full Kotlin compatiblity. To avoid the
cumbersome name, we can redefine it as our own @NullableType
annotation. (We can't use @Nullable to avoid name clashes with the main
@Nullable annotation from AndroidX)

Issue: google/ExoPlayer#6792
PiperOrigin-RevId: 540497469
2023-06-19 16:08:20 +01:00
tofunmi
4bceb64dee Version bump to media3:1.1.0-rc01
#minor-release

PiperOrigin-RevId: 539632164
2023-06-12 14:14:33 +00:00
kimvde
04d8edf19e Read Exif orientation data in DataSourceBitmapLoader
PiperOrigin-RevId: 537258424
2023-06-05 09:46:26 +00:00
tofunmi
49ea280bb8 Version bump to media3:1.1.0-beta01
#minor-release

PiperOrigin-RevId: 536464412
2023-05-30 18:48:06 +00:00
ibaker
fe667560d0 Upgrade to Robolectric 4.10.3
We originally upgraded to 4.10 in 889f435a49

However I saw `ShadowActivityThread.reset: ActivityThread not set`
errors when running any Robolectric test, so I downgraded to 4.8.1:
85e449cd87

Nobody else on the team was seeing the same error with 4.10, so it was
something different about my local setup.

The error was actually masking a different problem (see discussion:
https://github.com/robolectric/robolectric/issues/8160). Upgrading to
4.10.1 made the underlying error clear:

```
java.lang.UnsatisfiedLinkError: /tmp/libconscrypt_openjdk_jni-linux-x86_6416831044223480000.so: libstdc++.so.6: cannot open shared object file: No such file or directory
```
This was then fixed by changing my 'Gradle JDK' value in Android Studio
from a JDK 11-based value to a 17-based one. If others see the same
`UnsatisfiedLinkError` when running the tests locally they should check
their Gradle JDK setting in Android Studio.

However there was **another** problem with 4.10 that **did** affect
everyone: some tests in `ExoPlayerTest` would fail with time outs or
assertion failures related to clock advancement.

After some investigation in https://github.com/robolectric/robolectric/issues/8187
it turns out this is because there's lots of unrelease `Player`
instances in `ExoPlayerTest`, which keep lots of active `HandlerThreads`
that then have to all be woken up by Robolectric. 4.10.3 has a fix that
mitigates this, so we can upgrade immediately - but we should also
release all the `Player` instances in `ExoPlayerTest` (it might speed
up test execution too).

PiperOrigin-RevId: 533068395
2023-05-18 12:23:03 +00:00
ibaker
9366b4e50a Rollback of 509830f38f
*** Original commit ***

Rollback of 221a56da38

*** Original commit ***

Rollback of 749d77b1d9

*** Original commit ***

PiperOrigin-RevId: 531530885
2023-05-15 10:41:58 +01:00
tofunmi
8c5e1974f2 Version bump to media3:1.1.0-alpha01
#minor-release

PiperOrigin-RevId: 529735598
2023-05-05 17:00:08 +00:00
ibaker
85e449cd87 Downgrade back to Robolectric 4.8.1
This partially reverts 889f435a49
because our tests fail with 4.10 with an error like:

```
ShadowActivityThread.reset: ActivityThread not set
java.lang.NullPointerException: ShadowActivityThread.reset: ActivityThread not set
	at java.base/java.util.Objects.requireNonNull(Objects.java:246)
	at org.robolectric.shadows.ShadowActivityThread.reset(ShadowActivityThread.java:284)
	at org.robolectric.Shadows.reset(Shadows.java:2665)
	at org.robolectric.android.internal.AndroidTestEnvironment.resetState(AndroidTestEnvironment.java:657)
	at org.robolectric.RobolectricTestRunner.lambda$finallyAfterTest$0(RobolectricTestRunner.java:370)
	at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:86)
	at org.robolectric.RobolectricTestRunner.finallyAfterTest(RobolectricTestRunner.java:368)
	at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$2(SandboxTestRunner.java:298)
	at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:99)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:830)
```

It looks like the code throwing this exception is new in Robolectric
4.10:
65654a76ce

PiperOrigin-RevId: 527290033
2023-04-27 12:26:41 +01:00
tonihei
889f435a49 Update dependencies to latest versions
The only dependencies that are not updated are the ones that need
to be kept in sync with other system (like Android source tree) or
would require a Kotlin dependency in common or exoplayer modules.

As a side effect, some demo apps now need a Kotlin config and some
additional modules require desugaring/multidex logic. To simplify
the setup, the desugaring and multidex steps are added to the common
config.

PiperOrigin-RevId: 527243950
2023-04-26 15:49:57 +01:00
ibaker
2d968a5d97 Rollback of 8d17faea33
*** Original commit ***

Rollback of d7983f9485

*** Original commit ***

Bump Guava version to 31.1

***

***

PiperOrigin-RevId: 526601244
2023-04-26 15:36:00 +01:00
ibaker
8d17faea33 Rollback of d7983f9485
*** Original commit ***

Bump Guava version to 31.1

***

PiperOrigin-RevId: 526046600
2023-04-24 11:34:24 +01:00
ibaker
d7983f9485 Bump Guava version to 31.1
PiperOrigin-RevId: 525756451
2023-04-24 11:25:54 +01:00
rohks
e033dbac03 Bump version numbers to Media3 1.0.1 and ExoPlayer 2.18.6
#minor-release

PiperOrigin-RevId: 523959161
2023-04-13 14:59:24 +01:00
Googler
509830f38f Make PlayerView fold aware
PiperOrigin-RevId: 523413988
2023-04-12 16:51:04 +01:00
tonihei
137b40b76f Bump version numbers to Media3 1.0.0 and ExoPlayer 2.18.5
#minor-release

PiperOrigin-RevId: 516514583
2023-03-14 15:56:30 +00:00
tonihei
cd753bd7b8 Bump version numbers to Media3 1.0.0-rc02 and ExoPlayer 2.18.4
#minor-release

PiperOrigin-RevId: 513488487
2023-03-02 13:25:15 +00:00
christosts
20eae0e041 Version bump for ExoPlayer 2.18.3 & media3-1.0.0-rc01
#minor-release

PiperOrigin-RevId: 509501665
2023-02-14 13:49:22 +00:00
ibaker
481f3fa7c7 Rollback of 46b4ebc7b6
*** Original commit ***

Make PlayerView fold aware

***

PiperOrigin-RevId: 493846471
2022-12-12 11:39:02 +00:00
Googler
46b4ebc7b6 Make PlayerView fold aware
PiperOrigin-RevId: 491963883
2022-12-12 10:44:02 +00:00
michaelkatz
4ea72f0c73 Version bump to exoplayer:2.18.2 and media3:1.0.0-beta03
#minor-release

PiperOrigin-RevId: 489959918
2022-11-22 10:09:12 +00:00
bachinger
c40cee67da Set targetSdkVersion of main demo app back to 29
#minor-release

PiperOrigin-RevId: 486969194
2022-11-10 14:32:38 +00:00
bachinger
79e67dea2c Bump appTargetSDKVersion to 33
#minor-release

PiperOrigin-RevId: 484514123
2022-10-31 11:48:57 +00:00
bachinger
006a519a0e Migrate media constants from androidx.media.util.MediaConstants
Adds root extras and metadata extras to MockMediaLibraryService and MockMediaBrowserCompatService and completed test cases for asserting
interoperability with a media1 or Media3 browser.

PiperOrigin-RevId: 480854842
2022-10-17 15:56:30 +00:00
christosts
49bfca5482 Bump dexmaker version
PiperOrigin-RevId: 479579252
2022-10-17 15:39:26 +00:00
rohks
be27daebc4 Version bump to exoplayer:2.18.1 and media3:1.0.0-beta02
#minor-release

PiperOrigin-RevId: 461162552
2022-07-15 10:20:58 +00:00
bachinger
1c0b4b32a4 Version bump to exoplayer:2.18.0 and media3:1.0.0-beta01
#minor-release

PiperOrigin-RevId: 455350486
2022-06-16 11:25:41 +00:00
olly
33caabbc44 Update compileSdkVersion to 33
PiperOrigin-RevId: 454573995
2022-06-14 17:08:17 +00:00
olly
5e139780f6 Upgrade Robolectric dependency to 4.8.1
PiperOrigin-RevId: 446423017
2022-05-09 10:53:40 +01:00
christosts
e521a8cc90 Rollback of 0f80d5a9f0
*** Original commit ***

Upgrade Robolectric dependency to 4.8

***

PiperOrigin-RevId: 446175705
2022-05-09 10:49:44 +01:00
olly
0f80d5a9f0 Upgrade Robolectric dependency to 4.8
PiperOrigin-RevId: 445196313
2022-05-09 10:31:17 +01:00
christosts
d152fc2ac1 Upgrade compileSdkVersion to 32 (Android 12L)
PiperOrigin-RevId: 441424063
2022-04-26 14:33:16 +01:00
claincly
d57958e86d Remove dependency of Robolectric snapshot.
Depend on a alpha release now, so that we can remove the snapshot repo.

PiperOrigin-RevId: 436471634
2022-03-22 14:49:12 +00:00
claincly
191629ed7c Making mediaCodecName @NonNull in DefaultCodec constructor.
PiperOrigin-RevId: 435045138
2022-03-16 14:34:52 +00:00
ibaker
af6f6bb406 Version bump to exoplayer:2.17.1 and media3:1.0.0-alpha03
#minor-release

PiperOrigin-RevId: 433467068
2022-03-09 14:51:19 +00:00
ibaker
f92ae23dd8 Version bump to exoplayer:2.17.0 and media3:1.0.0-alpha02
#minor-release

PiperOrigin-RevId: 430456963
2022-02-23 16:22:43 +00:00
ibaker
ad35995d54 Redefine VERSION_INT to include alpha/beta/rc/stable
#minor-release

PiperOrigin-RevId: 429596966
2022-02-22 10:29:12 +00:00
andrewlewis
ce4a028829 Publish the transformer demo app
PiperOrigin-RevId: 424850283
2022-01-28 16:48:06 +00:00
ibaker
1633ad12a3 Bump annotation-experimental to 1.2.0
PiperOrigin-RevId: 416753081
2022-01-05 10:25:34 +00:00
ibaker
075ee7fb3d Bump Guava version to 31.0.1
The version in the android tree was updated in
8337762fe0

PiperOrigin-RevId: 416011494
2022-01-05 09:59:41 +00:00
ibaker
a7a0ef934e Bump Guava version to 31.0.1
The version in the android tree was updated in
8337762fe0

PiperOrigin-RevId: 415999600
2022-01-05 09:58:31 +00:00
ibaker
204383d013 Bump Guava version to 31.0.1
The version in the android tree was updated in
8337762fe0

PiperOrigin-RevId: 415988097
2022-01-05 09:57:02 +00:00
ibaker
f1ab3cf195 Update androidx annotation-experimental version to 1.2-rc01
This version includes several bug fixes related to the `@RequiresOptIn`
annotation used for the `androidx.media3.util.UnstableApi` annotation
in this project.

PiperOrigin-RevId: 414384813
2021-12-07 17:37:31 +00:00
olly
fea552e709 Update dependency versions
Note: Updating androidxTestTruthVersion is required tot
arget API level 31.
PiperOrigin-RevId: 409167744
2021-11-19 14:42:25 +00:00
Andrew Lewis
933e207b3e Update to androidx.media3
PiperOrigin-RevId: 405656499
2021-10-27 09:12:46 +01:00
gyumin
bc1b2dae11 Update androidx.media version to 1.4.3
It fixes the issue that the library injects an intent query element to
app's AndroidManifest.xml by updating the dependency on androidx.media.
Please refer to the release note of androidx.media 1.4.3 for details.
https://developer.android.com/jetpack/androidx/releases/media#media-1.4.3

Issue: #9480
#minor-release
PiperOrigin-RevId: 403243445
2021-10-15 12:41:24 +01:00
bachinger
3d67400a8a Bump androidx.core version to 1.6.0
PiperOrigin-RevId: 401743951
2021-10-09 17:50:58 +01:00
gyumin
1e6a3aa6fb Update androidx.media version to 1.4.2
PiperOrigin-RevId: 399108998
2021-09-28 16:27:37 +01:00
christosts
276d2e9d0d Bump version to 2.15.1 and tidy release notes
#minor-release

PiperOrigin-RevId: 397758146
2021-09-20 17:39:23 +01:00
huangdarwin
a951769eaa Transformer Demo: Reduce visibility of demo-only include.
PiperOrigin-RevId: 395936070
2021-09-14 11:49:13 +01:00