Commit eedf50fd by bachinger Committed by Toni

use isPlaying to determine which notification action to display in compact view

PiperOrigin-RevId: 266782250
parent 494b6f6f
...@@ -1182,10 +1182,10 @@ public class PlayerNotificationManager { ...@@ -1182,10 +1182,10 @@ public class PlayerNotificationManager {
if (skipPreviousActionIndex != -1) { if (skipPreviousActionIndex != -1) {
actionIndices[actionCounter++] = skipPreviousActionIndex; actionIndices[actionCounter++] = skipPreviousActionIndex;
} }
boolean playWhenReady = player.getPlayWhenReady(); boolean isPlaying = isPlaying(player);
if (pauseActionIndex != -1 && playWhenReady) { if (pauseActionIndex != -1 && isPlaying) {
actionIndices[actionCounter++] = pauseActionIndex; actionIndices[actionCounter++] = pauseActionIndex;
} else if (playActionIndex != -1 && !playWhenReady) { } else if (playActionIndex != -1 && !isPlaying) {
actionIndices[actionCounter++] = playActionIndex; actionIndices[actionCounter++] = playActionIndex;
} }
if (skipNextActionIndex != -1) { if (skipNextActionIndex != -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment