Signal dream end to overlay in finish().

Originally, the dream service signaled its exit to the overlay when
the window detaches. However, there are other flows where it's possible
for the dream to initiate exiting before this point. In this case, the
teardown will begin and a race condition will exist between signaling
to the overlay and stopping the dream process.

This changelist addresses this by placing the exit signal to the
overlay in finish. Proceeding through finish is deferred until this
signal is sent, ensuring the overlay is always informed.

Fixes: 265920994
Test: atest DreamOverlayTest
Change-Id: I1a07d3839979d37599c1e053d8715340b5c4830c
1 file changed