BatteryStats: Increase max size of subsystem state string

New devices may have many more subsystems, which was resulting in
missing data in batterystats history.

Bug: 168156597
Test: Run device and trigger batterystats history events. Verify that we
don't hit the max buffer size indicated by a log message.

Change-Id: I2f23dd1dbb4df5c3d9680d7087967563acb72197
This commit is contained in:
Benjamin Schwartz
2021-02-04 10:00:21 -08:00
parent 17373ec548
commit 0e5b47ebae

View File

@@ -126,7 +126,7 @@ public final class BatteryStatsService extends IBatteryStats.Stub
.onMalformedInput(CodingErrorAction.REPLACE)
.onUnmappableCharacter(CodingErrorAction.REPLACE)
.replaceWith("?");
private static final int MAX_LOW_POWER_STATS_SIZE = 4096;
private static final int MAX_LOW_POWER_STATS_SIZE = 8192;
private static final int POWER_STATS_QUERY_TIMEOUT_MILLIS = 2000;
private final HandlerThread mHandlerThread;