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

Commit 24fdd7a4 authored by Ruben Brunk's avatar Ruben Brunk Committed by Android (Google) Code Review
Browse files

Merge "camera2: Fix empty set handling for eviction." into mnc-dev

parents e6858d59 8050721d
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -432,6 +432,7 @@ std::vector<std::shared_ptr<ClientDescriptor<KEY, VALUE>>> ClientManager<KEY, VA

    auto iter = evicted.cbegin();

    if (iter != evicted.cend()) {
        // Remove evicted clients from list
        mClients.erase(std::remove_if(mClients.begin(), mClients.end(),
            [&iter] (std::shared_ptr<ClientDescriptor<KEY, VALUE>>& curClientPtr) {
@@ -441,6 +442,7 @@ std::vector<std::shared_ptr<ClientDescriptor<KEY, VALUE>>> ClientManager<KEY, VA
                }
                return false;
            }), mClients.end());
    }

    mClients.push_back(client);
    mRemovedCondition.broadcast();