Defer future actions until reset it complete.

This changelist makes sure that we don't proceed with future actions
within methods that call reset until the reset is complete. Resets
can be deferred due to in-progress exit animations. This means that
exit logic and then potentially subsequent dream starting logic
might run before the reset logic executes. As a result, components
might be reset during an active state. By deferring resets and then
sequencing follow-up actions, the actions are properly ordered with
their reset requests and each other.

Test: atest DreamOverlayServiceTest
Fixes: 362334941
Flag: EXEMPT bugfix
Change-Id: I4fc722441a323bd818f7b23c84b7e24e6bccce6b
2 files changed