Fix Beam animation deadlock.

There was a path possible where finish() was
being called while a screenshot was still
captured on another thread. When the thread
finished, it would throw up the animation
and never exit.

This fix stores the request to finish() in the
state, waits for the screenshot thread to complete,
and moves to the IDLE state in case.

Also made the entire view touchable for initiating
the Beam.

Bug: 8576613
Bug: 8578026
Change-Id: I0d0158fb95918e23e32dc22c6537f5dac2aa46b1
1 file changed