use isPlaying to determine which notification action to display in compact view
PiperOrigin-RevId: 266782250
This commit is contained in:
parent
494b6f6f3b
commit
eedf50fdca
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user