Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cdf034cb authored by Koushik Dutta's avatar Koushik Dutta
Browse files

Backwards compatibility for Froyo libcamera. This may or may not work.

Change-Id: I2da2f9b1df0aa9dca6d617a08de9fa82ac5d9cae
parent e59e0309
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -1292,4 +1292,31 @@ status_t CameraService::dump(int fd, const Vector<String16>& args) {
    return NO_ERROR;
}

#ifdef BOARD_USE_FROYO_LIBCAMERA
static CameraInfo sCameraInfo[] = {
    {
        CAMERA_FACING_BACK,
        90,  /* orientation */
    }
};

extern "C" int HAL_getNumberOfCameras()
{
    return sizeof(sCameraInfo) / sizeof(sCameraInfo[0]);
}

extern "C" void HAL_getCameraInfo(int cameraId, struct CameraInfo* cameraInfo)
{
    memcpy(cameraInfo, &sCameraInfo[cameraId], sizeof(CameraInfo));
}

extern "C" sp<CameraHardwareInterface> openCameraHardware(int cameraId);

extern "C" sp<CameraHardwareInterface> HAL_openCameraHardware(int cameraId)
{
    LOGV("openCameraHardware: call createInstance");
    return openCameraHardware(cameraId);
}
#endif

}; // namespace android