mirror of
https://github.com/joel16/android_device_sony_kitakami-common.git
synced 2024-11-27 05:30:23 +00:00
kitakami-common: QCamera2: HAL: FlashLight widget fix for HAL1
Issue: Flashlight in system tray is not working with HAL1 on devices with module version >= 2.4. Its due to framework looks for ANDROID_FLASH_INFO_AVAILABLE property which is not set in the HAL1 camera info. Fix: Populate the required camera static characteristics regardless of HAL version. CRs-Fixed: 993695 Change-Id: I5d3b95b3b3f4ab72ae3b67c87a8a2d257260a5de
This commit is contained in:
parent
5ff03252ca
commit
1f21f54530
@ -250,19 +250,18 @@ int QCamera2Factory::getCameraInfo(int camera_id, struct camera_info *info)
|
|||||||
return NO_INIT;
|
return NO_INIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( mHalDescriptors[camera_id].device_version == CAMERA_DEVICE_API_VERSION_3_0 ) {
|
ALOGI("Camera id %d API version %d",
|
||||||
rc = QCamera3HardwareInterface::getCamInfo(mHalDescriptors[camera_id].cameraId, info);
|
camera_id, mHalDescriptors[camera_id].device_version);
|
||||||
} else if (mHalDescriptors[camera_id].device_version == CAMERA_DEVICE_API_VERSION_1_0) {
|
|
||||||
rc = QCamera2HardwareInterface::getCapabilities(mHalDescriptors[camera_id].cameraId, info);
|
// Need ANDROID_FLASH_INFO_AVAILABLE property for flashlight widget to
|
||||||
} else {
|
// work and so get the static data regardless of HAL version
|
||||||
ALOGE("%s: Device version for camera id %d invalid %d",
|
rc = QCamera3HardwareInterface::getCamInfo(
|
||||||
__func__,
|
mHalDescriptors[camera_id].cameraId, info);
|
||||||
camera_id,
|
if (mHalDescriptors[camera_id].device_version ==
|
||||||
mHalDescriptors[camera_id].device_version);
|
CAMERA_DEVICE_API_VERSION_1_0) {
|
||||||
return BAD_VALUE;
|
info->device_version = CAMERA_DEVICE_API_VERSION_1_0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ALOGV("%s: X", __func__);
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user