Fix error message for stop precondition

This commit is contained in:
Ryan Heise 2019-12-29 23:01:00 +11:00
parent 0e65a839a9
commit 5e0fc0fd76
1 changed files with 2 additions and 2 deletions

View File

@ -284,7 +284,7 @@ public class AudioPlayer implements MethodCallHandler {
transition(PlaybackState.stopped);
result.success(null);
break;
// TODO: Allow stopping from buffered state.
// TODO: Allow stopping from buffered/connecting states.
case playing:
case paused:
synchronized (monitor) {
@ -305,7 +305,7 @@ public class AudioPlayer implements MethodCallHandler {
}
break;
default:
throw new IllegalStateException("Can call stop only from playing, paused and buffering states (" + state + ")");
throw new IllegalStateException("Can call stop only from playing/paused/stopped/completed states (" + state + ")");
}
}