HostActivity
@UnstableApi
class HostActivity : Activity, SurfaceHolder.Callback
| kotlin.Any | |||||
| ↳ | android.content.Context | ||||
| ↳ | android.content.ContextWrapper | ||||
| ↳ | android.view.ContextThemeWrapper | ||||
| ↳ | android.app.Activity | ||||
| ↳ | androidx.media3.test.utils.HostActivity |
A host activity for performing playback tests.
Summary
Nested types |
|---|
interface HostActivity.HostedTestInterface for tests that run inside of a |
Public constructors |
|---|
Public functions |
|
|---|---|
Unit |
|
Unit |
onPause() |
Unit |
onStart() |
Unit |
onStop() |
Unit |
runTest(hostedTest: HostActivity.HostedTest!, timeoutMs: Long)Executes a |
Unit |
runTest(Executes a |
Unit |
surfaceChanged(holder: SurfaceHolder!, format: Int, width: Int, height: Int) |
Unit |
surfaceCreated(holder: SurfaceHolder!) |
Unit |
surfaceDestroyed(holder: SurfaceHolder!) |
Inherited Constants |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Public constructors
Public functions
runTest
fun runTest(hostedTest: HostActivity.HostedTest!, timeoutMs: Long): Unit
Executes a HostedTest inside the host.
| Parameters | |
|---|---|
hostedTest: HostActivity.HostedTest! |
The test to execute. |
timeoutMs: Long |
The number of milliseconds to wait for the test to finish. If the timeout is exceeded then the test will fail. |
runTest
fun runTest(
hostedTest: HostActivity.HostedTest!,
timeoutMs: Long,
failOnTimeoutOrForceStop: Boolean
): Unit
Executes a HostedTest inside the host.
| Parameters | |
|---|---|
hostedTest: HostActivity.HostedTest! |
The test to execute. |
timeoutMs: Long |
The number of milliseconds to wait for the test to finish. |
failOnTimeoutOrForceStop: Boolean |
Whether the test fails when a timeout is exceeded or the test is stopped forcefully. |
surfaceChanged
fun surfaceChanged(holder: SurfaceHolder!, format: Int, width: Int, height: Int): Unit