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

Commit e0e349b2 authored by Ravneet's avatar Ravneet
Browse files

CameraService: Add path to update vendorTag info upon HAL update

- Add setupVendorTag method to allow updates to vendor tag
information from camera manager

Bug: 181579423
Test: Test: Manual; GCA Validity check; Removed setUpVendorTag in enumerateProviders to force initial vendorTag info update using
onStatusChanged

Change-Id: I01212f4c6d5010a09178727ace2177c3c6b8c617
parent a32bd3bd
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -144,6 +144,11 @@ interface ICameraService
     */
    VendorTagDescriptor getCameraVendorTagDescriptor();

    /**
     * Setup vendor tags for camera providers
     */
    void setUpVendorTags();

    /**
     * Retrieve the vendor tag descriptor cache which can have multiple vendor
     * providers.
+16 −0
Original line number Diff line number Diff line
@@ -852,6 +852,22 @@ String8 CameraService::getFormattedCurrentTime() {
    return String8(formattedTime);
}

Status CameraService::setUpVendorTags() {
    ATRACE_CALL();

    Mutex::Autolock lock(mServiceLock);

    Status ret = Status::ok();

    if (mCameraProviderManager != nullptr) {
        mCameraProviderManager->setUpVendorTags();
    } else {
        ret = STATUS_ERROR(ERROR_DISCONNECTED, "CameraProviderManager is NULL");
    }

    return ret;
}

Status CameraService::getCameraVendorTagDescriptor(
        /*out*/
        hardware::camera2::params::VendorTagDescriptor* desc) {
+1 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ public:
    virtual binder::Status     getCameraVendorTagCache(
            /*out*/
            hardware::camera2::params::VendorTagDescriptorCache* cache);
    virtual binder::Status     setUpVendorTags();

    virtual binder::Status     connect(const sp<hardware::ICameraClient>& cameraClient,
            int32_t cameraId, const String16& clientPackageName,