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

Commit 4841d264 authored by Chenjie Yu's avatar Chenjie Yu
Browse files

fix multiple activation across boot

If a metric is activated and gets activated again after boot, it should
not change its current state.

Bug: 124327892
Bug: 123038368
Test: manual
Change-Id: I50a57223384faa5736c6e7ee562f4db74326a7ad
parent e34c699d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -107,7 +107,8 @@ void MetricProducer::activateLocked(int activationTrackerIndex, int64_t elapsedT
    if (it == mEventActivationMap.end()) {
        return;
    }
    if (mActivationType == MetricActivation::ACTIVATE_ON_BOOT) {
    if (mActivationType == MetricActivation::ACTIVATE_ON_BOOT &&
        it->second.state == ActivationState::kNotActive) {
        it->second.state = ActivationState::kActiveOnBoot;
        return;
    }