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