Camera:Retain dumpsys logs from previous open session.

When cameraserver is started and no devices have been open yet, there
will be no previous retained info in the dumpsys.If a single device is
open and closed, dumpsys taken during closed camera will show the
previous open session info.

If multiple devices are open and any of the devices disconnect, info for
all the devices open will be retained and will be available in dumpsys
output.

All the cached data will be cleared during new connect device session.

bug: 185140738
Test: Tested locally. Camera CTS tests pass.
Change-Id: I60470ab148c5df2a5de0cf3abcf02e07cbc99a0d
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
index d1ed59a..7b0037e 100644
--- a/services/camera/libcameraservice/CameraService.h
+++ b/services/camera/libcameraservice/CameraService.h
@@ -202,6 +202,8 @@
             std::vector<hardware::CameraStatus>* cameraStatuses, bool isVendor = false,
             bool isProcessLocalTest = false);
 
+    void cacheDump();
+
     // Monitored UIDs availability notification
     void                notifyMonitoredUids();
 
@@ -785,6 +787,12 @@
     // Return NO_ERROR if the device with a give ID can be connected to
     status_t checkIfDeviceIsUsable(const String8& cameraId) const;
 
+    // Adds client logs during open session to the file pointed by fd.
+    void dumpOpenSessionClientLogs(int fd, const Vector<String16>& args, const String8& cameraId);
+
+    // Adds client logs during closed session to the file pointed by fd.
+    void dumpClosedSessionClientLogs(int fd, const String8& cameraId);
+
     // Container for managing currently active application-layer clients
     CameraClientManager mActiveClientManager;