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

Commit efb7bfa9 authored by Shuzhen Wang's avatar Shuzhen Wang
Browse files

Camera: Provider: Set up vendor tag before getDeviceVersion

getDeviceVersion calls get_camera_info, which could contain vendor tags.
As a result, we need to set up vendor tag before that.

Test: Verify vendor tag in static metadata works.
Bug: 33641150
Change-Id: Id4cfea52235542b19170a757b4c6bea3ad1d190d
parent af81f210
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -183,6 +183,12 @@ bool CameraProvider::initialize() {
    }
    ALOGI("Loaded \"%s\" camera module", mModule->getModuleName());

    // Setup vendor tags here so HAL can setup vendor keys in camera characteristics
    VendorTagDescriptor::clearGlobalVendorTagDescriptor();
    if (!setUpVendorTags()) {
        ALOGE("%s: Vendor tag setup failed, will not be available.", __FUNCTION__);
    }

    // Setup callback now because we are going to try openLegacy next
    err = mModule->setCallbacks(this);
    if (err != OK) {
@@ -225,11 +231,6 @@ bool CameraProvider::initialize() {
        }
    }

    // Setup vendor tags here so HAL can setup vendor keys in camera characteristics
    VendorTagDescriptor::clearGlobalVendorTagDescriptor();
    if (!setUpVendorTags()) {
        ALOGE("%s: Vendor tag setup failed, will not be available.", __FUNCTION__);
    }
    return false; // mInitFailed
}