Merge branch 'master' of git://github.com/phonegap/phonegap-android

This commit is contained in:
macdonst 2011-08-25 12:45:03 -04:00
commit 4b488fc911

View File

@ -86,7 +86,10 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, On
// Stop any play or record
if (this.mPlayer != null) {
this.stopPlaying();
if ((this.state == MEDIA_RUNNING) || (this.state == MEDIA_PAUSED)) {
this.mPlayer.stop();
this.setState(MEDIA_STOPPED);
}
this.mPlayer.release();
this.mPlayer = null;
}