diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp index d4b8238014c..3bd60054485 100644 --- a/services/camera/libcameraservice/device3/Camera3Device.cpp +++ b/services/camera/libcameraservice/device3/Camera3Device.cpp @@ -149,11 +149,20 @@ status_t Camera3Device::initialize(sp manager, const Stri // Do not override characteristics for physical cameras res = manager->getCameraCharacteristics( physicalId, /*overrideForPerfClass*/false, &mPhysicalDeviceInfoMap[physicalId]); + // HACK for ginkgo - check camera id 20 for depth sensor if (res != OK) { - SET_ERR_L("Could not retrieve camera %s characteristics: %s (%d)", + CLOGW("Could not retrieve camera %s characteristics: %s (%d)", physicalId.c_str(), strerror(-res), res); - session->close(); - return res; + physicalId = std::to_string(20); // TODO: Maybe make this a soong config? + CLOGW("Trying physical camera %s if available", physicalId.c_str()); + res = manager->getCameraCharacteristics( + physicalId, false, &mPhysicalDeviceInfoMap[physicalId]); + if (res != OK) { + SET_ERR_L("Could not retrieve camera %s characteristics: %s (%d)", + physicalId.c_str(), strerror(-res), res); + session->close(); + return res; + } } bool usePrecorrectArray =