Fixed: application crash when trying to play media that is already

playing
This commit is contained in:
daniel oeh 2012-06-27 14:40:34 +02:00
parent 853556b0cf
commit 2ba8847610
2 changed files with 7 additions and 3 deletions

View File

@ -360,6 +360,7 @@ public class FeedManager {
PodDBAdapter adapter = new PodDBAdapter(context);
adapter.open();
long result = adapter.setMedia(media);
adapter.close();
return result;
}

View File

@ -171,8 +171,11 @@ public class PlaybackService extends Service {
stopSelf();
}
} else if (media != null && status != PlayerStatus.PLAYING) {
play();
} else if (media != null) {
if (status == PlayerStatus.PAUSED) {
play();
}
} else {
Log.w(TAG, "Something went wrong. Shutting down...");
stopSelf();
@ -424,7 +427,7 @@ public class PlaybackService extends Service {
public boolean isPlayingVideo() {
return playingVideo;
}
public boolean isShouldStream() {
return shouldStream;
}