From b218d910ad3c272840eb74410e6a6b372f8fa2ee Mon Sep 17 00:00:00 2001 From: ibaker Date: Thu, 15 Feb 2024 09:47:27 -0800 Subject: [PATCH] Fix docs on `playUntilStartOfMediaItem` to match `playUntilPosition` The behaviour and docs of `playUntilPosition` were changed in https://github.com/androidx/media/commit/00c7a9bcbb3d805db9b3a335affdb9d3329825fc. This change also affects `playUntilStartOfMediaItem` (since it delegates to `playUntilPosition`), so the same doc change should also be made here. #minor-release PiperOrigin-RevId: 607364897 (cherry picked from commit fa3212e73e5b5f958e6b0aace459d50232e56de5) --- .../test/utils/robolectric/TestPlayerRunHelper.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libraries/test_utils_robolectric/src/main/java/androidx/media3/test/utils/robolectric/TestPlayerRunHelper.java b/libraries/test_utils_robolectric/src/main/java/androidx/media3/test/utils/robolectric/TestPlayerRunHelper.java index 1e15c89535..684917e17b 100644 --- a/libraries/test_utils_robolectric/src/main/java/androidx/media3/test/utils/robolectric/TestPlayerRunHelper.java +++ b/libraries/test_utils_robolectric/src/main/java/androidx/media3/test/utils/robolectric/TestPlayerRunHelper.java @@ -340,8 +340,12 @@ public class TestPlayerRunHelper { /** * Calls {@link Player#play()}, runs tasks of the main {@link Looper} until the {@code player} - * reaches the specified media item or a playback error occurs, and then pauses the {@code - * player}. + * reaches the specified media item or a playback error occurs. + * + *

The playback thread is automatically blocked from making further progress after reaching the + * media item and will only be unblocked by other {@code run/playUntil...} methods, custom {@link + * RobolectricUtil#runMainLooperUntil} conditions or an explicit {@link + * ThreadTestUtil#unblockThreadsWaitingForProgressOnCurrentLooper()} on the main thread. * *

If a playback error occurs it will be thrown wrapped in an {@link IllegalStateException}. *