summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorKweku Adams <kwekua@google.com>2020-06-29 11:37:34 -0700
committerKweku Adams <kwekua@google.com>2020-06-29 18:53:58 +0000
commitb42d0c70c2f47672af66cd9dac3071c69176c0f8 (patch)
treeaef280f92982a9ba5606e8f19955852ff899afb9 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent5a6a57409462d231b156a12d904fe909ff765186 (diff)
Fix and expand battery saver stats tracking.
The STATE_CHARGING value had the BatterySaverState bits to resemble "ON", so dumpsys would incorrectly say battery saver was on whenever the device was plugged in. It also meant that the enabled count would incorrectly increase whenever the device was plugged and unplugged. This change fixes that by explicitly checking for the magic values before incrementing the counters. In addition, this adds more logging around adaptive battery saver stats and removes the STATE_CHARGING magic value in favor of an explicit PLUGGED/UNPLUGGED state to move away from the assumption that battery saver is off whenever the device is plugged in. Bug: 32423528 Bug: 119261320 Bug: 158581564 Test: atest com.android.server.power.batterysaver.BatterySaverPolicyTest Test: atest com.android.server.power.batterysaver.BatterySaverStateMachineTest Test: atest com.android.server.power.batterysaver.BatterySavingStatsTest Test: atest com.android.server.power.PowerManagerServiceTest Change-Id: I071d47299360a003febd5251c2515c0b55b3cfff
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions