summaryrefslogtreecommitdiff
path: root/camera/common/1.0/default/CameraModule.cpp
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2019-01-18 17:32:06 -0800
committerEino-Ville Talvala <etalvala@google.com>2019-02-07 16:20:35 -0800
commit2951804146cd3239f3b4371021cb95b4aa52fc2f (patch)
tree7b7e818ec4e2f9feb17e373bd3b3a930239acd2c /camera/common/1.0/default/CameraModule.cpp
parent918a7de8d52ccd8436e4e5d1bb32a16a7e13a15a (diff)
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
Diffstat (limited to 'camera/common/1.0/default/CameraModule.cpp')
-rw-r--r--camera/common/1.0/default/CameraModule.cpp11
1 files changed, 11 insertions, 0 deletions
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: