Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6f8863fc
authored
Oct 10, 2022
by
christosts
Committed by
Marc Baechinger
Oct 17, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Minor naming cleanup in MediaControllerListenerTest
PiperOrigin-RevId: 480041937
parent
266de1b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
libraries/test_session_current/src/androidTest/java/androidx/media3/session/MediaControllerListenerTest.java
libraries/test_session_current/src/androidTest/java/androidx/media3/session/MediaControllerListenerTest.java
View file @
6f8863fc
...
...
@@ -258,7 +258,7 @@ public class MediaControllerListenerTest {
threadTestRule
.
getHandler
().
postAndSync
(
controller:
:
release
);
// release is done immediately for session.
tes
tNoInteraction
(
controller
);
asser
tNoInteraction
(
controller
);
// Test whether the controller is notified about later release of the session or
// re-creation.
...
...
@@ -2603,31 +2603,28 @@ public class MediaControllerListenerTest {
// This causes the session service to die.
remoteSession
.
release
();
// controllerTestRule.waitForDisconnect(controller, true);
tes
tNoInteraction
(
controller
);
asser
tNoInteraction
(
controller
);
// Ensure that the controller cannot use newly create session with the same ID.
// Recreated session has different session stub, so previously created controller
// shouldn't be available.
remoteSession
=
createRemoteMediaSession
(
id
);
tes
tNoInteraction
(
controller
);
asser
tNoInteraction
(
controller
);
}
// Test that session and controller doesn't interact.
// Note that this method can be called after the session is died, so session may not have
// valid player.
private
void
testNoInteraction
(
MediaController
controller
)
throws
Exception
{
/**
* Asserts that {@link #remoteSession} and {@code controller} don't interact.
*
* <p>Note that this method can be called after the session is died, so {@link #remoteSession} may
* not have valid player.
*/
private
void
assertNoInteraction
(
MediaController
controller
)
throws
Exception
{
// TODO: check that calls from the controller to session shouldn't be delivered.
// Calls from the session to controller shouldn't be delivered.
CountDownLatch
latch
=
new
CountDownLatch
(
1
);
controllerTestRule
.
setRunnableForOnCustomCommand
(
controller
,
new
Runnable
()
{
@Override
public
void
run
()
{
latch
.
countDown
();
}
});
controller
,
/* runnable= */
()
->
latch
.
countDown
());
SessionCommand
customCommand
=
new
SessionCommand
(
"testNoInteraction"
,
/* extras= */
Bundle
.
EMPTY
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment