Fix pause used instead of play in paused popup player when seeking

Also use `setBackgroundResource` to automatically obtain PNG drawables (from exoplayer)
This commit is contained in:
Stypox 2020-04-01 22:33:37 +02:00
parent 158727e2f2
commit 883bcc735d
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23

View file

@ -905,8 +905,7 @@ public final class PopupVideoPlayer extends Service {
resetNotification();
updateNotification(R.drawable.exo_controls_pause);
videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(),
R.drawable.ic_pause_white_24dp));
videoPlayPause.setBackgroundResource(R.drawable.exo_controls_pause);
hideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME);
startForeground(NOTIFICATION_ID, notBuilder.build());
@ -927,8 +926,7 @@ public final class PopupVideoPlayer extends Service {
resetNotification();
updateNotification(R.drawable.exo_controls_play);
videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(),
R.drawable.ic_play_arrow_white_24dp));
videoPlayPause.setBackgroundResource(R.drawable.exo_controls_play);
stopForeground(false);
}
@ -939,8 +937,7 @@ public final class PopupVideoPlayer extends Service {
resetNotification();
updateNotification(R.drawable.exo_controls_play);
videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(),
R.drawable.ic_pause_white_24dp));
videoPlayPause.setBackgroundResource(R.drawable.exo_controls_play);
}
@Override
@ -951,8 +948,7 @@ public final class PopupVideoPlayer extends Service {
resetNotification();
updateNotification(R.drawable.ic_replay_white_24dp);
videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(),
R.drawable.ic_replay_white_24dp));
videoPlayPause.setBackgroundResource(R.drawable.ic_replay_white_24dp);
stopForeground(false);
}