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

Commit b492ac69 authored by Anthony Stange's avatar Anthony Stange Committed by android-build-merger
Browse files

Merge "Decrement size of pending write queue by correct amount"

am: 79fc8d02

Change-Id: I4d8f3d5bac10dd7192788cccf47ddcfa6231d7c8
parents fd7e72f3 79fc8d02
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -486,15 +486,14 @@ void HalProxy::handlePendingWrites() {
                }
            }
            lock.lock();
            mSizePendingWriteEventsQueue -= numToWrite;
            if (pendingWriteEvents.size() > eventQueueSize) {
                // TODO(b/143302327): Check if this erase operation is too inefficient. It will copy
                // all the events ahead of it down to fill gap off array at front after the erase.
                pendingWriteEvents.erase(pendingWriteEvents.begin(),
                                         pendingWriteEvents.begin() + eventQueueSize);
                mSizePendingWriteEventsQueue -= eventQueueSize;
            } else {
                mPendingWriteEventsQueue.pop();
                mSizePendingWriteEventsQueue -= pendingWriteEvents.size();
            }
        }
    }