Merge "Camera: remove the camera device version check during statusCallback"
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 91dda92..ae7e05c 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -3758,25 +3758,13 @@
ALOGE("%s: Invalid camera id %s, skipping", __FUNCTION__, cameraId.string());
return;
}
- bool supportsHAL3 = false;
- // supportsCameraApi also holds mInterfaceMutex, we can't call it in the
- // HIDL onStatusChanged wrapper call (we'll hold mStatusListenerLock and
- // mInterfaceMutex together, which can lead to deadlocks)
- binder::Status sRet =
- supportsCameraApi(String16(cameraId), hardware::ICameraService::API_VERSION_2,
- &supportsHAL3);
- if (!sRet.isOk()) {
- ALOGW("%s: Failed to determine if device supports HAL3 %s, supportsCameraApi call failed",
- __FUNCTION__, cameraId.string());
- return;
- }
// Collect the logical cameras without holding mStatusLock in updateStatus
// as that can lead to a deadlock(b/162192331).
auto logicalCameraIds = getLogicalCameras(cameraId);
// Update the status for this camera state, then send the onStatusChangedCallbacks to each
// of the listeners with both the mStatusLock and mStatusListenerLock held
- state->updateStatus(status, cameraId, rejectSourceStates, [this, &deviceKind, &supportsHAL3,
+ state->updateStatus(status, cameraId, rejectSourceStates, [this, &deviceKind,
&logicalCameraIds]
(const String8& cameraId, StatusInternal status) {
@@ -3804,8 +3792,8 @@
bool isVendorListener = listener->isVendorListener();
if (shouldSkipStatusUpdates(deviceKind, isVendorListener,
listener->getListenerPid(), listener->getListenerUid()) ||
- (isVendorListener && !supportsHAL3)) {
- ALOGV("Skipping discovery callback for system-only camera/HAL1 device %s",
+ isVendorListener) {
+ ALOGV("Skipping discovery callback for system-only camera device %s",
cameraId.c_str());
continue;
}