Skip to content

Commit 1f5cbdb

Browse files
johngray1965Cooleditor23
authored andcommitted
added checks to see that KEYCODE_MEDIA_PLAY_PAUSE and KEYCODE_HEADSETHOOK result in correct calls on the player
1 parent d35c360 commit 1f5cbdb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/test_session_current/src/androidTest/java/androidx/media3/session/MediaSessionTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,8 @@ controllerInfo, getMediaButtonIntent(KEYCODE_HEADSETHOOK)))
650650
player.awaitMethodCalled(MockPlayer.METHOD_SEEK_TO_NEXT, TIMEOUT_MS);
651651
player.awaitMethodCalled(MockPlayer.METHOD_SEEK_TO_PREVIOUS, TIMEOUT_MS);
652652
player.awaitMethodCalled(MockPlayer.METHOD_STOP, TIMEOUT_MS);
653+
player.awaitMethodCalled(MockPlayer.METHOD_PLAY, TIMEOUT_MS);
654+
player.awaitMethodCalled(MockPlayer.METHOD_PLAY, TIMEOUT_MS);
653655
assertThat(callerCollectorPlayer.callingControllers).hasSize(9);
654656
for (ControllerInfo controllerInfo : callerCollectorPlayer.callingControllers) {
655657
assertThat(session.get().isMediaNotificationController(controllerInfo)).isTrue();

0 commit comments

Comments
 (0)