Wait for buffers to drain

When a BufferQueue producer disconnects and reconnects, we retain
the previously-queued buffers but empty the slots.  This allows
the number of queued buffers to grow without limit.  The low-memory
killer does not approve.

Bug 11069934

Change-Id: Ia2eaa954c7a3904b54209a3701dba01689e204d8
1 file changed