Look at the processCpuUsagemethod BatteryHistoryto find out how it extracts Uid.Proc, from which you can get the time spent on user code execution, the time spent on system code execution, the time spent in the foreground, and the number of times the process started.
source
share