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

Commit 95781fe5 authored by Christine Tsai's avatar Christine Tsai Committed by Android (Google) Code Review
Browse files

Merge "Fix partial reset function in StateTracker"

parents 781ebde5 50f5bad0
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -139,6 +139,13 @@ void StateTracker::handlePartialReset(const int64_t eventTimeNs,
                                      const HashableDimensionKey& primaryKey) {
    VLOG("StateTracker handle partial reset");
    if (mStateMap.find(primaryKey) != mStateMap.end()) {
        for (auto l : mListeners) {
            auto sl = l.promote();
            if (sl != nullptr) {
                sl->onStateChanged(eventTimeNs, mAtomId, primaryKey,
                                   mStateMap.find(primaryKey)->second.state, mDefaultState);
            }
        }
        mStateMap.erase(primaryKey);
    }
}