For each app that appears in the batterystats data, there is an AppActivity object (which subclasses from AppInfo, because the needs of the upcoming PowerReport object are similar). Inside the AppActivity, there are ComponentActivity objects. Each power using component has a ComponentActivity for the fields required. The additional Report objects in RawBatteryStats are also added here. This change usess modem data as a proof of concept. The exact fields in it may evolve, even though the calculation uses tx and rx packets, the final power calculation uses time, and putting the batterystats apportioning logic in the batterystats handling code seems better than what we're doing here. Anyway, that can be iterated upon. Test: atest frameworks/base/tools/powermodel --host Change-Id: I2c5fce16d4fef3628d64107562d6cf9ea4edbbc2
444 B
444 B
1 | 9,0,i,vers,32,177,PPR1.180326.002,PQ1A.181105.015 |
---|---|
2 | 9,0,i,uid,10139,com.google.android.gm |
3 | 9,0,l,gn,108060756,17293456,4896592,3290614,97840,72941,6903,8107,390,105 |
4 | 9,0,l,m,2590630,0,384554,3943868,5113727,265,2565483,0,16,0,0,0,0,192,25331,3472068,17,3543323,14,614050,0 |
5 | 9,10139,l,nt,13688501,534571,13842,7792,9925,5577,30,67,190051799,27,0,0,5,3,126020,42343,13842,7792,207,167,30,67 |
6 | 9,0,l,sgt,3066958,0,34678,1643364,7045084 |
7 | 9,0,l,sst,2443805 |