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

Commit 63a983a3 authored by Shuzhen Wang's avatar Shuzhen Wang Committed by android-build-merger
Browse files

Merge "Camera: Handle duplicate camera Id due to openLegacy support" into stage-aosp-master

am: 2a9191b9

Change-Id: Ie4584be34011b927b4e1cda60542390373f65ba2
parents e05d9deb 2a9191b9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -631,8 +631,13 @@ status_t CameraProviderManager::ProviderInfo::addDevice(const std::string& name,

    mUniqueCameraIds.insert(id);
    if (isAPI1Compatible) {
        // addDevice can be called more than once for the same camera id if HAL
        // supports openLegacy.
        if (std::find(mUniqueAPI1CompatibleCameraIds.begin(), mUniqueAPI1CompatibleCameraIds.end(),
                id) == mUniqueAPI1CompatibleCameraIds.end()) {
            mUniqueAPI1CompatibleCameraIds.push_back(id);
        }
    }

    if (parsedId != nullptr) {
        *parsedId = id;