Loading core/res/res/values/config_battery_stats.xml +4 −0 Original line number Diff line number Diff line Loading @@ -70,5 +70,9 @@ It only affects the `dumpsys batterystats -c` command, The checkin Format --> <integer name="config_batteryHistoryDumpCheckinWindowSize">0</integer> <!-- Time span of battery history dump, in milliseconds, default value is 24 hours in millis. It only affects the `dumpsys batterystats -\-checkin` command, The real checkin Format --> <integer name="config_batteryHistoryDumpRealCheckinWindowSize">86400000</integer> </resources> core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -5467,6 +5467,7 @@ <java-symbol type="integer" name="config_batteryHistoryStorageSize" /> <java-symbol type="integer" name="config_batteryHistoryDumpWindowSize" /> <java-symbol type="integer" name="config_batteryHistoryDumpCheckinWindowSize" /> <java-symbol type="integer" name="config_batteryHistoryDumpRealCheckinWindowSize" /> <!--Dynamic Tokens--> <java-symbol name="system_accent1_0_light" type="color"/> Loading services/core/java/com/android/server/am/BatteryStatsService.java +12 −0 Original line number Diff line number Diff line Loading @@ -3105,6 +3105,18 @@ public final class BatteryStatsService extends IBatteryStats.Stub if ("--checkin".equals(arg)) { useCheckinFormat = true; isRealCheckin = true; if (Flags.realCheckinHistoryStartTime()) { long realCheckinDurationLimit = mContext.getResources().getInteger( com.android.internal.R.integer .config_batteryHistoryDumpRealCheckinWindowSize); if (realCheckinDurationLimit > 0) { monotonicClockStartTime = mMonotonicClock.monotonicTime() - realCheckinDurationLimit; if (monotonicClockStartTime < 0) { monotonicClockStartTime = 0; } } } } else if ("--history".equals(arg)) { flags |= BatteryStats.DUMP_HISTORY_ONLY; } else if ("--history-start".equals(arg)) { Loading services/core/java/com/android/server/power/stats/flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -46,3 +46,11 @@ flag { bug: "403599628" is_fixed_read_only: true } flag { namespace: "backstage_power" name: "real_checkin_history_start_time" description: "Add duration limit to battery stats real check in (csv) format" bug: "403599628" is_fixed_read_only: true } Loading
core/res/res/values/config_battery_stats.xml +4 −0 Original line number Diff line number Diff line Loading @@ -70,5 +70,9 @@ It only affects the `dumpsys batterystats -c` command, The checkin Format --> <integer name="config_batteryHistoryDumpCheckinWindowSize">0</integer> <!-- Time span of battery history dump, in milliseconds, default value is 24 hours in millis. It only affects the `dumpsys batterystats -\-checkin` command, The real checkin Format --> <integer name="config_batteryHistoryDumpRealCheckinWindowSize">86400000</integer> </resources>
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -5467,6 +5467,7 @@ <java-symbol type="integer" name="config_batteryHistoryStorageSize" /> <java-symbol type="integer" name="config_batteryHistoryDumpWindowSize" /> <java-symbol type="integer" name="config_batteryHistoryDumpCheckinWindowSize" /> <java-symbol type="integer" name="config_batteryHistoryDumpRealCheckinWindowSize" /> <!--Dynamic Tokens--> <java-symbol name="system_accent1_0_light" type="color"/> Loading
services/core/java/com/android/server/am/BatteryStatsService.java +12 −0 Original line number Diff line number Diff line Loading @@ -3105,6 +3105,18 @@ public final class BatteryStatsService extends IBatteryStats.Stub if ("--checkin".equals(arg)) { useCheckinFormat = true; isRealCheckin = true; if (Flags.realCheckinHistoryStartTime()) { long realCheckinDurationLimit = mContext.getResources().getInteger( com.android.internal.R.integer .config_batteryHistoryDumpRealCheckinWindowSize); if (realCheckinDurationLimit > 0) { monotonicClockStartTime = mMonotonicClock.monotonicTime() - realCheckinDurationLimit; if (monotonicClockStartTime < 0) { monotonicClockStartTime = 0; } } } } else if ("--history".equals(arg)) { flags |= BatteryStats.DUMP_HISTORY_ONLY; } else if ("--history-start".equals(arg)) { Loading
services/core/java/com/android/server/power/stats/flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -46,3 +46,11 @@ flag { bug: "403599628" is_fixed_read_only: true } flag { namespace: "backstage_power" name: "real_checkin_history_start_time" description: "Add duration limit to battery stats real check in (csv) format" bug: "403599628" is_fixed_read_only: true }