summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorKweku Adams <kwekua@google.com>2019-03-07 15:38:21 -0800
committerKweku Adams <kwekua@google.com>2019-03-18 18:31:11 -0700
commitf57f99edd721af648840c92aa0f05001c52dad6b (patch)
treeff9b63bc040d5490165ab679ce2d32599cef7195 /rs/java/android/renderscript/RenderScript.java
parent0718f9d0d564ea0ab0480119999cc400181889e1 (diff)
Formalizing states in BatterySaverStateMachine.
Formalizing the states and transitions makes it easier to add new functionality and guarantee correctness. This also fixes the issue where automatically turning off sticky accidentally turns off battery saver since the transition is only done when in the correct state. The problem was that when the battery level changed (above the sticky auto disable threshold), doAutoBatterySaver would be called. stickyEnabled would be true, and the level would be above the threshold, so it would disable sticky. Then at the next level drop, doAutoBatterySaver would be called again, but this time, sticky would be false, so it would go to automatic check and see that the level is above the threshold and then turn off battery saver. Bug: 127659938 Bug: 119764865 Bug: 112232746 Bug: 79580230 Test: atest com.android.server.power.batterysaver.BatterySaverStateMachineTest Test: atest CtsBatterySavingTestCases Change-Id: Ia311d8bdc593a1680eda82d4d06fee21ea45c0ba
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
0 files changed, 0 insertions, 0 deletions