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

Commit 925a27fe authored by Jayant Chowdhary's avatar Jayant Chowdhary
Browse files

cameraserver hidl: Skip vendor ids with tag count <=0 for getCameraVendorTagSections.



Bug: 199420805

Test: Use getCameraVendorTagSections on devices where a provider returns -1 for getTagCount via vndk

Change-Id: I29f23b6771168ec19c693b2a443f1c9a3fe4c13d
Signed-off-by: default avatarJayant Chowdhary <jchowdhary@google.com>
parent a9e60472
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -279,6 +279,9 @@ Return<void> HidlCameraService::getCameraVendorTagSections(getCameraVendorTagSec
        size_t numSections = sectionNames->size();
        std::vector<std::vector<HVendorTag>> tagsBySection(numSections);
        int tagCount = desc->getTagCount();
        if (tagCount <= 0) {
            continue;
        }
        std::vector<uint32_t> tags(tagCount);
        desc->getTagArray(tags.data());
        for (int i = 0; i < tagCount; i++) {