From f67e23ef637d0b53a0d4bebb68c654234df3da94 Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Wed, 23 Jul 2014 17:17:59 -0700 Subject: CameraService: Clean up availability listeners and HAL error codes - Refactor where availability listeners are called to centralize behavior, ensuring that all client creation/destruction invokes the listeners - Clean up some of the client hierarchy - Filter error codes from key HAL calls to ensure proper reporting Bug: 16514157 Bug: 16483222 Change-Id: I59875a865b6a508b47423946c78862da8df34cd1 --- services/camera/libcameraservice/device2/Camera2Device.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'services/camera/libcameraservice/device2') diff --git a/services/camera/libcameraservice/device2/Camera2Device.cpp b/services/camera/libcameraservice/device2/Camera2Device.cpp index 89c6b10..c1f77fa 100644 --- a/services/camera/libcameraservice/device2/Camera2Device.cpp +++ b/services/camera/libcameraservice/device2/Camera2Device.cpp @@ -30,6 +30,7 @@ #include #include #include "Camera2Device.h" +#include "CameraService.h" namespace android { @@ -67,8 +68,8 @@ status_t Camera2Device::initialize(camera_module_t *module) camera2_device_t *device; - res = module->common.methods->open(&module->common, name, - reinterpret_cast(&device)); + res = CameraService::filterOpenErrorCode(module->common.methods->open( + &module->common, name, reinterpret_cast(&device))); if (res != OK) { ALOGE("%s: Could not open camera %d: %s (%d)", __FUNCTION__, -- cgit v1.1