profcollect: Move periodic trace worker to the system server
We used to have the periodic background trace worker in the native side,
and relied on Doze mode to pause the collection when the device is
inactive. This is not very accurate.
Instead, we move the worker to the system server where we know exactly
if the device is interactive, and we can make sure we only trace when
the device is executing workload useful for profiling.
Test: manual
Bug: 381005420
Change-Id: I3c063cb63cb8d54e3e175eeee3118d60ee79714c
3 files changed