Skip to content

Commit

Permalink
use isPlaying to determine which notification action to display in co…
Browse files Browse the repository at this point in the history
…mpact view

PiperOrigin-RevId: 266782250
  • Loading branch information
marcbaechinger authored and tonihei committed Sep 5, 2019
1 parent 494b6f6 commit eedf50f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1182,10 +1182,10 @@ protected int[] getActionIndicesForCompactView(List<String> actionNames, Player
if (skipPreviousActionIndex != -1) {
actionIndices[actionCounter++] = skipPreviousActionIndex;
}
boolean playWhenReady = player.getPlayWhenReady();
if (pauseActionIndex != -1 && playWhenReady) {
boolean isPlaying = isPlaying(player);
if (pauseActionIndex != -1 && isPlaying) {
actionIndices[actionCounter++] = pauseActionIndex;
} else if (playActionIndex != -1 && !playWhenReady) {
} else if (playActionIndex != -1 && !isPlaying) {
actionIndices[actionCounter++] = playActionIndex;
}
if (skipNextActionIndex != -1) {
Expand Down

0 comments on commit eedf50f

Please sign in to comment.