camera: Fix memory leak in stop recording usecase.
Issue: 1. In CameraSource, if both recording proxy and local camera instances are null, the frames which are supposed to be returned back to Camera, will never be returned, causing memory leak. 2. If a frame is returned from CameraSource after stop recording is issued, Camera HAL cannot handle it because by that time it will be previewing state. Fix: 1. Since camera handles are not available, close the native handle in CameraSource itself. 2. Close the duped native handles in cameraservice instead of delegating the responsibility to Camera HAL. Bug: 30299751 CRs-Fixed: 1040448 Change-Id: I45a351d0813dff15034fa25b79987ceab07232bb
Loading
Please register or sign in to comment