Camera: Account for any pending freed buffers during the offline switch

During offline session switches, pending buffer cache updates may not
have the ability to propagate to CameraHal due to absence of any
additional capture requests. This scenario will result in a delta between
the circulating buffers declared by Hal and the current buffer records in
camera service.
Try to detect and avoid possible switch failures in such cases.

Bug: 232892208
Test: Camera CTS
Change-Id: I835ec422131135eb884130a79642d5cb9952498b
1 file changed