Reset common association source while resetting procstats associations

Bug: 188130785
Bug: 183101565
Bug: 186438656
Test: atest ProcStatsValidationTests
Test: atest ProcessStatsDumpsysTest
Test: atest CtsIncidentHostTestCases:ProcStatsProtoTest
Test: atest CtsStatsdHostTestCases
Change-Id: I0a555c86bc6ba341a6344f28f73faca914d65c3f
This commit is contained in:
Jing Ji
2021-05-14 14:57:59 -07:00
parent 328d2d56b6
commit ea9ed7b0f2

View File

@@ -322,6 +322,15 @@ public final class AssociationState {
mActiveDuration = 0;
mActiveDurations = null;
}
// We're actually resetting the common sources in process state already,
// resetting it here too in case they're out of sync.
if (mAssociationState != null) {
final SourceState commonSource = getCommonSourceState(false);
if (commonSource != null) {
commonSource.resetSafely(now);
mCommonSourceState = null;
}
}
}
void commitStateTime(long nowUptime) {