media/libraries/session/src
tonihei 9abe9e2a97 Refine auto-update logic of CommandButton.isEnabled
We currently update this value for controllers to match the
availability of the associated command. This however makes it
impossible to mark a button as unavailable if the command is
available. This can be refined by only setting the 'enabled'
field to false if the command is not available, not the other
way round. And we should also enable the button by default as
disabling is the unusual case not many apps will use.

In addition, this change fixes missing update logic when the
player commands changed and it adds some additional test coverage
for all these cases.

PiperOrigin-RevId: 612881016
2024-03-05 10:08:17 -08:00
..
main Refine auto-update logic of CommandButton.isEnabled 2024-03-05 10:08:17 -08:00
test Refine auto-update logic of CommandButton.isEnabled 2024-03-05 10:08:17 -08:00