Loading
Support playNow on queued SLEEP transits
When a transition is queued, we usually post the onCollectStarted callback to avoid ordering issues w/ the prior transition. This means that anything in the handler queue will execute before onCollectStarted. Again, this is desired normally and it means those actions will be collected in the new transition. However, SLEEP transitions are currently treated as empty sentinels (at-least today). While there's nothing wrong with collecting changes in SLEEP transitions, we still have some transitions (eg. around keyguard) that can race with it, so to reduce those races short-term, this adds a check for SLEEP when dequeuing and start that immediately vs. posting. Bug: 304713150 Test: Existing tests pass. Change-Id: Id234414c220367a2e971fa29cf03ba631c7564f1