DO NOT MERGE ANYWHERE: ImageReader: Add discardFreeBuffers method

This method (currently @hide) discards all cached buffers for
the ImageReader, which can be useful to free up memory at the
cost of reallocation time if more buffers are needed later.

It has no effect on acquired Images, filled Images waiting to be
acquired, or buffers being actively used by the source rendering to the

Bug: 28695173
Change-Id: I427a8ba4ad73a267083f843dbf228bfc53a730d9
(cherry picked from commit e175aa82b58d70cc75ee683d65ee6ba041b9fe43)
2 files changed