Filter media notification actions

The DefaultMediaNotificationProvider checks if a command is available
before putting the respective action in the notification.

PiperOrigin-RevId: 440114422
This commit is contained in:
christosts 2022-04-07 16:36:23 +01:00 committed by Ian Baker
parent 4b46acef9c
commit 005882e6cf

View File

@ -521,6 +521,11 @@ public interface Player {
return flags.contains(command);
}
/** Returns whether the set of commands contains at least one of the given {@code commands}. */
public boolean containsAny(@Command int... commands) {
return flags.containsAny(commands);
}
/** Returns the number of commands in this set. */
public int size() {
return flags.size();