mirror of
https://github.com/samsonjs/media.git
synced 2026-04-14 12:45:47 +00:00
Properly chain commands in MediaSessionStub
The commands currently use a task and a postTask that are chained
together manually. In some cases, e.g. when adding MediaItems,
the postTask is already a chain of commands in itself.
To allow using the entire command handling as a single task
(for simplified queueing), we can change the implementation to
always create a single task. If multiple subtasks need to be
chained together, we can do that by wrapping the method calls.
In case a task is asynchronous, we can also use Futures to
chain them together.
Overall, this is just a refactoring and changes no logic.
Issue: androidx/media#85
PiperOrigin-RevId: 462085724
(cherry picked from commit 45f1f5b378)
This commit is contained in:
parent
4cbbbc89c1
commit
d84662e5ce
1 changed files with 197 additions and 420 deletions
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue