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

Commit d4a653a1 authored by Yin-Chia Yeh's avatar Yin-Chia Yeh
Browse files

Camera: setup vendor tags before get_camera_info

So HAL can use vendor tags on first get_camera_info call.

Bug: 24913201
Change-Id: I73f17de87e3712a27f9cee366995df27a740f5cb
parent d805214c
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -173,6 +173,13 @@ void CameraService::onFirstRef()
    mNumberOfCameras = mModule->getNumberOfCameras();
    mNumberOfNormalCameras = mNumberOfCameras;

    // Setup vendor tags before we call get_camera_info the first time
    // because HAL might need to setup static vendor keys in get_camera_info
    VendorTagDescriptor::clearGlobalVendorTagDescriptor();
    if (mModule->getModuleApiVersion() >= CAMERA_MODULE_API_VERSION_2_2) {
        setUpVendorTags();
    }

    mFlashlight = new CameraFlashlight(*mModule, *this);
    status_t res = mFlashlight->findFlashUnits();
    if (res) {
@@ -239,12 +246,6 @@ void CameraService::onFirstRef()
        mModule->setCallbacks(this);
    }

    VendorTagDescriptor::clearGlobalVendorTagDescriptor();

    if (mModule->getModuleApiVersion() >= CAMERA_MODULE_API_VERSION_2_2) {
        setUpVendorTags();
    }

    CameraDeviceFactory::registerService(this);

    CameraService::pingCameraServiceProxy();