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

Skip to content
Commit b0491f89 authored by Connor O'Brien's avatar Connor O'Brien
Browse files

libtimeinstate: tolerate multiple calls to startTrackingUidTimes



system_server instantiates 2 of each type of KernelCpuUidTimeReader,
but the logic in startTrackingUidTimes() must run exactly once. Revise
startTrackingUidTimes() to return immediately if tracking is already
active. This makes it safe to call from the KernelCpuUidTimeReader
constructor, ensuring that tracking will start as early as possible.

Bug: 138317993
Test: boot & check that time_in_state programs have been attached
exactly once
Change-Id: Ic64438a3270874b398a8db07531521fe1d02a3de
Signed-off-by: default avatarConnor O'Brien <connoro@google.com>
parent 8e7d61c0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment