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
(cherry picked from commit 45f1f5b)
  • Loading branch information
tonihei authored and microkatz committed Jul 20, 2022
1 parent 4cbbbc8 commit d84662e
Showing 1 changed file with 197 additions and 420 deletions.
Loading

0 comments on commit d84662e

Please sign in to comment.