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); PodDBAdapter adapter = new PodDBAdapter(context);
adapter.open(); adapter.open();
long result = adapter.setMedia(media); long result = adapter.setMedia(media);
adapter.close();
return result; return result;
} }

View File

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