Methods Summary |
---|
public void | checkStateErrors(MediaRecorderStateErrors stateErrors)1. It is valid to call stop() in the following states:
{Recording}.
2. It is invalid to call stop() in the following states:
{Initial, Initialized, DataSourceConfigured, Prepared, Error}
// Valid states.
assertTrue(!stateErrors.errorInRecordingState);
// Invalid states.
assertTrue(stateErrors.errorInInitialState);
assertTrue(stateErrors.errorInInitialStateAfterReset);
assertTrue(stateErrors.errorInInitialStateAfterStop);
assertTrue(stateErrors.errorInInitializedState);
assertTrue(stateErrors.errorInErrorState);
assertTrue(stateErrors.errorInDataSourceConfiguredState);
assertTrue(stateErrors.errorInPreparedState);
|
public void | invokeMethodUnderTest(android.media.MediaRecorder recorder)
// Wait for some time before stopping the media recorder.
// This will fix the assertion caused by stopping it immediatedly
// after it is started
try {
Thread.sleep(SLEEP_TIME_BEFORE_STOP);
} catch(Exception e) {
Log.v(TAG, "sleep was interrupted and terminated prematurely");
}
recorder.stop();
|
public void | testStop()
mTestTemplate.runTestOnMethod(this);
|
public java.lang.String | toString()
return "stop()";
|