Camera: Fix testLongProcessingRepeatingFlexibleYuv flake

The abortCapture() waits for SESSION_READY state. However,
the previous SESSION_READY state from createCaptureSession
needs to be drained first. Otherwise, the wait for SESSION_READY
in abortCapture() is a no-op.

That incurs a race condition between the abortCaptures() and
createCaptureSession.

Test: ImageReaderTest#testLongProcessingRepeatingFlexibleYuv
Bug: 319033758
Change-Id: Ie6c0d6273a3bf9601a15ff1adefb87e843a13f8a
1 file changed