keep notification when stop(false) is called

ISSUE: #6041
PiperOrigin-RevId: 253958225
This commit is contained in:
bachinger 2019-06-19 10:27:38 +01:00 committed by Oliver Woodman
parent 0f514a093b
commit 5d544974e9

View File

@ -966,7 +966,8 @@ public class PlayerNotificationManager {
@Nullable NotificationCompat.Builder builder, @Nullable NotificationCompat.Builder builder,
boolean ongoing, boolean ongoing,
@Nullable Bitmap largeIcon) { @Nullable Bitmap largeIcon) {
if (player.getPlaybackState() == Player.STATE_IDLE) { if (player.getPlaybackState() == Player.STATE_IDLE
&& (player.getCurrentTimeline().isEmpty() || playbackPreparer == null)) {
builderActions = null; builderActions = null;
return null; return null;
} }