BlastBufferQueue: Fix wait in onFrameAvailable

Use the same logic in both onFrameAvailable and processNextBufferLocked
to check if we can acquire a buffer. Otherwise, there is a chance we
will not be waiting long enough in onFrameAvailable.

Also add error logs if we return unexpectedly when trying to acquire a
buffer.
Test: go/wm-smoke with blast enabled
Test: atest SurfaceViewBufferTests
Change-Id: I2f8afa2fc2efb0371ccc86b422524e474e3f6170

Change-Id: Ibf2733725f7a4334eff38b516f0f5cec87dfd493
2 files changed