From 2951804146cd3239f3b4371021cb95b4aa52fc2f Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Fri, 18 Jan 2019 17:32:06 -0800 Subject: Camera: Restructure default camera.provider 2.4 To allow for implementation inheritance of @2.4 legacy wrapper and @2.4 external webcamera HALs in the @2.5 implementations, restructure the existing default provider to separate the service interface into a thin shim that calls the implementations. Test: Camera starts as usual after refactor, VTS tests pass Bug: 121379978 Change-Id: Id40790ed4fb495577fd2b885c706b2ed7a96d64e --- camera/common/1.0/default/CameraModule.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'camera/common/1.0/default/CameraModule.cpp') diff --git a/camera/common/1.0/default/CameraModule.cpp b/camera/common/1.0/default/CameraModule.cpp index 08354b312d..3e3ef433a5 100644 --- a/camera/common/1.0/default/CameraModule.cpp +++ b/camera/common/1.0/default/CameraModule.cpp @@ -462,6 +462,17 @@ int CameraModule::isStreamCombinationSupported(int cameraId, camera_stream_combi return res; } +void CameraModule::notifyDeviceStateChange(uint64_t deviceState) { + if (getModuleApiVersion() >= CAMERA_MODULE_API_VERSION_2_5 && + mModule->notify_device_state_change != NULL) { + ATRACE_BEGIN("camera_module->notify_device_state_change"); + ALOGI("%s: calling notify_device_state_change with state %" PRId64, __FUNCTION__, + deviceState); + mModule->notify_device_state_change(deviceState); + ATRACE_END(); + } +} + status_t CameraModule::filterOpenErrorCode(status_t err) { switch(err) { case NO_ERROR: -- cgit v1.2.3