Merge "Persist metric activation across beta4/5 ota" into qt-dev

am: 12ae95987b

Change-Id: I614602e2a4facb0ccdf40ab8599f875750ce0679
This commit is contained in:
Tej Singh
2019-06-08 09:06:34 -07:00
committed by android-build-merger

View File

@@ -174,7 +174,9 @@ void MetricProducer::loadActiveMetricLocked(const ActiveMetric& activeMetric,
continue;
}
auto& activation = it->second;
if (activeEventActivation.state() == ActiveEventActivation::ACTIVE) {
// If the event activation does not have a state, assume it is active.
if (!activeEventActivation.has_state() ||
activeEventActivation.state() == ActiveEventActivation::ACTIVE) {
// We don't want to change the ttl for future activations, so we set the start_ns
// such that start_ns + ttl_ns == currentTimeNs + remaining_ttl_nanos
activation->start_ns =