Skip to content

Commit

Permalink
Properly chain commands in MediaSessionStub
Browse files Browse the repository at this point in the history
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: #85
PiperOrigin-RevId: 462085724
  • Loading branch information
tonihei authored and rohitjoins committed Jul 21, 2022
1 parent ac300c4 commit 45f1f5b
Showing 1 changed file with 197 additions and 420 deletions.
Loading

0 comments on commit 45f1f5b

Please sign in to comment.