CameraService: fix camera removal paths
Currently the camera subsystem is trying to store all cameras, that
have ever been registered with it by camera HALs. This makes it
easier for the framework, but with hotpluggable cameras it makes
little sense, because for this HALs also have to store all cameras,
that have ever been plugged in and with every new plug in event
identify, whether this is a new camera or a known one. An easier and
cleaner approach is to remove cameras upon unplug. This patch
implements that.
Change-Id: Ie38cad59449386351518655e723e3f826a2ec826
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.h b/services/camera/libcameraservice/common/CameraProviderManager.h
index e82282f..b14a2c6 100644
--- a/services/camera/libcameraservice/common/CameraProviderManager.h
+++ b/services/camera/libcameraservice/common/CameraProviderManager.h
@@ -384,6 +384,8 @@
// Generate vendor tag id
static metadata_vendor_id_t generateVendorTagId(const std::string &name);
+
+ void removeDevice(std::string id);
};
// Utility to find a DeviceInfo by ID; pointer is only valid while mInterfaceMutex is held