SF: fix SurfaceFlinger freeze

When BufferQueueLayer errors in onFrameAvailable and
onFrameReplaced, it infinitely loops. This patch adds
a break when we get into the bad state.

Bug: 147476322
Test: verified by vendor that this fixes their bug
      and SurfaceFlinger_test

Change-Id: Ida063470edc7e688d106ec9fbac3c81bc5e00189
1 file changed