Count down three playback states to match the assertion

PiperOrigin-RevId: 648629427
(cherry picked from commit ec3a58f8db)
This commit is contained in:
bachinger 2024-07-02 01:26:22 -07:00 committed by Tianyi Feng
parent b01c6ffcb3
commit 4dc21fd743

View file

@ -240,7 +240,7 @@ public class MediaControllerCompatCallbackWithMediaSessionTest {
@Test
public void sendError_toAllControllers_onPlaybackStateChangedToErrorStateAndWithCorrectErrorData()
throws Exception {
CountDownLatch latch = new CountDownLatch(2);
CountDownLatch latch = new CountDownLatch(3);
List<PlaybackStateCompat> playbackStates = new ArrayList<>();
MediaControllerCompat.Callback callback =
new MediaControllerCompat.Callback() {
@ -301,7 +301,7 @@ public class MediaControllerCompatCallbackWithMediaSessionTest {
public void
sendError_toMediaNotificationController_onPlaybackStateChangedToErrorStateAndWithCorrectErrorData()
throws Exception {
CountDownLatch latch = new CountDownLatch(2);
CountDownLatch latch = new CountDownLatch(3);
List<PlaybackStateCompat> playbackStates = new ArrayList<>();
MediaControllerCompat.Callback callback =
new MediaControllerCompat.Callback() {