Skip to content
Commit bd7a6253 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Rework battery saver synchronization logic

- Stop using individual lock instances and use use the power manager lock.
- Make sure not to access external components with the lock held,
*except for settings provider*, which is already touched by the power manager
and the battery service

(I'm planning to re-organize things for Q: b/79580230)

Fixes: 79486713

Test: atest /android/pi-dev/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/Battery*Test.java /android/pi-dev/frameworks/base/services/tests/servicestests/src/com/android/server/power/*Test.java
Test: Manual test with ./development/scripts/battery_simulator.py with toggling
battery saver on and off and then watch
adb logcat -b all | grep -P '(battery_saving_stats|battery_saver_mode)'

Change-Id: I8ecdfefe978de348ee979d765c82e3d8f0280082
parent 15aa546a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment