public void | checkStateErrors(MediaPlayerStateErrors stateErrors)1. It is valid to call stop() in the following states:
{Prepared, Started, Stopped, Paused, PlaybackCompleted}.
2. It is invalid to call stop() in the following states:
{Idle, Initialized, Error}
// Valid states.
assertTrue(!stateErrors.errorInStartedState);
assertTrue(!stateErrors.errorInStartedStateAfterPause);
assertTrue(!stateErrors.errorInStoppedState);
assertTrue(!stateErrors.errorInPreparedState);
assertTrue(!stateErrors.errorInPreparedStateAfterStop);
assertTrue(!stateErrors.errorInPlaybackCompletedState);
assertTrue(!stateErrors.errorInPausedState);
// Invalid states.
assertTrue(!stateErrors.errorInIdleState); // noError() won't be called
assertTrue(stateErrors.errorInIdleStateAfterReset);
assertTrue(stateErrors.errorInInitializedState);
assertTrue(stateErrors.errorInErrorState);
|