Loading services/camera/libcameraservice/CameraService.cpp +24 −18 Original line number Diff line number Diff line Loading @@ -1551,7 +1551,9 @@ bool CameraService::evictClientIdByRemote(const wp<IBinder>& remote) { * Also check that the device HAL version is still in support */ int CameraService::checkCameraCapabilities(int id, camera_info info, int *latestStrangeCameraId) { // device_version undefined in CAMERA_MODULE_API_VERSION_1_0, // All CAMERA_MODULE_API_VERSION_1_0 devices are backward-compatible if (mModule->getModuleApiVersion() >= CAMERA_MODULE_API_VERSION_2_0) { // Verify the device version is in the supported range switch (info.device_version) { case CAMERA_DEVICE_API_VERSION_1_0: Loading @@ -1567,9 +1569,13 @@ int CameraService::checkCameraCapabilities(int id, camera_info info, int *latest default: ALOGE("%s: Device %d has HAL version %x, which is not supported", __FUNCTION__, id, info.device_version); logServiceError("Unsupported device HAL version", NO_INIT); String8 msg = String8::format( "Unsupported device HAL version %x for device %d", info.device_version, id); logServiceError(msg.string(), NO_INIT); return NO_INIT; } } // Assume all devices pre-v3.3 are backward-compatible bool isBackwardCompatible = true; Loading services/camera/libcameraservice/common/CameraModule.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,9 @@ int CameraModule::getCameraInfo(int cameraId, struct camera_info *info) { int ret; ATRACE_BEGIN("camera_module->get_camera_info"); ret = mModule->get_camera_info(cameraId, info); // Fill in this so CameraService won't be confused by // possibly 0 device_version info->device_version = CAMERA_DEVICE_API_VERSION_1_0; ATRACE_END(); return ret; } Loading Loading
services/camera/libcameraservice/CameraService.cpp +24 −18 Original line number Diff line number Diff line Loading @@ -1551,7 +1551,9 @@ bool CameraService::evictClientIdByRemote(const wp<IBinder>& remote) { * Also check that the device HAL version is still in support */ int CameraService::checkCameraCapabilities(int id, camera_info info, int *latestStrangeCameraId) { // device_version undefined in CAMERA_MODULE_API_VERSION_1_0, // All CAMERA_MODULE_API_VERSION_1_0 devices are backward-compatible if (mModule->getModuleApiVersion() >= CAMERA_MODULE_API_VERSION_2_0) { // Verify the device version is in the supported range switch (info.device_version) { case CAMERA_DEVICE_API_VERSION_1_0: Loading @@ -1567,9 +1569,13 @@ int CameraService::checkCameraCapabilities(int id, camera_info info, int *latest default: ALOGE("%s: Device %d has HAL version %x, which is not supported", __FUNCTION__, id, info.device_version); logServiceError("Unsupported device HAL version", NO_INIT); String8 msg = String8::format( "Unsupported device HAL version %x for device %d", info.device_version, id); logServiceError(msg.string(), NO_INIT); return NO_INIT; } } // Assume all devices pre-v3.3 are backward-compatible bool isBackwardCompatible = true; Loading
services/camera/libcameraservice/common/CameraModule.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,9 @@ int CameraModule::getCameraInfo(int cameraId, struct camera_info *info) { int ret; ATRACE_BEGIN("camera_module->get_camera_info"); ret = mModule->get_camera_info(cameraId, info); // Fill in this so CameraService won't be confused by // possibly 0 device_version info->device_version = CAMERA_DEVICE_API_VERSION_1_0; ATRACE_END(); return ret; } Loading