diff options
author | Bookatz <bookatz@google.com> | 2018-06-05 12:42:37 -0700 |
---|---|---|
committer | Adam Bookatz <bookatz@google.com> | 2018-06-05 19:46:23 +0000 |
commit | 0bd972083a43365ef753e5e09b9f1e6735864139 (patch) | |
tree | 3f04a3881afb4fbd1019db1b509aef9c3c99314d /tools/aapt2/java/JavaClassGenerator.cpp | |
parent | e5736b6730b07620e2a503a861b8d72d53a59786 (diff) |
Wean statsd off batterystats: workchain (cp)
Modified cherry pick from master:
(cherry picked from commit d888df2ba99e117b50a5553e18426ad370294a20)
covering ag/4210168 and ag/4230692.
The tool that generates StatsLogInternal.java now includes the following
type of code, to accomodate WorkSources automatically.
public static void write(int code, WorkSource ws, int arg2) {
for (int i = 0; i < ws.size(); ++i) {
write_non_chained(code, ws.get(i), ws.getName(i), arg2);
}
ArrayList<WorkSource.WorkChain> workChains = ws.getWorkChains();
if (workChains != null) {
for (WorkSource.WorkChain wc : workChains) {
write(code, wc.getUids(), wc.getTags(), arg2);
}
}
}
This will reduce a lot of code repitition for the StatsLog.write calls
in BatteryStats. Consequently, doing so will make it easier to remove
these StatsLog.write calls out of BatteryStats.
Bug: 80308558
Bug: 80314737
Test: manual verification
Test: com.android.internal.os.BatteryStatsTests
Change-Id: Ied537a6195121f16ef49b6bccf58c8c31964909c
Merged-In: Ibd28297345f4ab926dec01a89de0f1bfff9f8871
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions