Fixed: application crash when trying to play media that is already
playing
This commit is contained in:
parent
853556b0cf
commit
2ba8847610
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,8 +171,11 @@ public class PlaybackService extends Service {
|
||||||
stopSelf();
|
stopSelf();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (media != null && status != PlayerStatus.PLAYING) {
|
} else if (media != null) {
|
||||||
play();
|
if (status == PlayerStatus.PAUSED) {
|
||||||
|
play();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.w(TAG, "Something went wrong. Shutting down...");
|
Log.w(TAG, "Something went wrong. Shutting down...");
|
||||||
stopSelf();
|
stopSelf();
|
||||||
|
|
Loading…
Reference in New Issue