Wait for reporting work to compete before finalizing
There was a misunderstanding in the WorkManager API where we were
waiting for the enqueueUniqueWork future. This future completes when the
work is enqueued, not when it actually completes.
To actually wait for the state change until completion, we need the work
itself to call the finalization controller. We add the API for this and
make the appropriate refactors/checks.
Bug: 279517666
Test: atest DeviceLockControllerRoboTests
Change-Id: I598754464dc394cf0e1004c1e4ddd90cd43c9125
5 files changed