Don't remove UID data in readKernelCpuUid*TimesLocked
In both of these cases (removed isolated UID and nonexistent user) the
affected UID has already previously been enqueued in
mPendingRemovedUids and so all underlying cpu time data will be
cleared together after 5 minutes. Clearing the different sets of times
separately is buggy due to creating inconsistency among the
KernelCpuUid*TimeReaders. Removing data in these functions also
defeats the 5-minute delay that was intended to give statsd a chance
to read the data for removed UIDs.
Also update BatteryStatsCpuTimesTest to reflect the new behavior
Bug: 182272121
Test: atest com.android.internal.os.BatteryStatsTests shows no new
failures
Change-Id: I5719aecd5603cd9cecfbf75cede5eceeda8d0f5b
Signed-off-by: Connor O'Brien <connoro@google.com>
Loading
Please register or sign in to comment