android: camera_hal_manager: Clean up resources when terminating

The CameraHalManager starts the libcamera CameraManager and creates
CameraProxy instances for each camera in the system. Clean up those
resources when the CameraHalManager terminates.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Laurent Pinchart 2019-08-18 02:17:56 +03:00
parent dadd1fd8fe
commit 3e4672f159

View file

@ -90,6 +90,10 @@ void CameraHalManager::run()
/* Now start processing events and messages. */
exec();
/* Clean up the resources we have allocated. */
proxies_.clear();
cameraManager_->stop();
}
CameraProxy *CameraHalManager::open(unsigned int id,