Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0941120f authored by Ng Zhi An's avatar Ng Zhi An
Browse files

Add api to change charging state update delay

This adds a field Settings.Global.BATTERY_CHARGING_STATE_UPDATE_DELAY
that overrides the value of battery_charged_delay_ms in
Settings.GLOBAL.BATTERY_STATS_CONSTANTS.

This new field can then be set for experimentation, and easily reset to
default by deleting, or setting it to a negative value.

Expose a method in BatteryManager to set a value for this new setting.

Bug: 111360323
Test: adb shell settings put global battery_charging_state_update_delay 999
adb shell dumpsys batterystats --settings # should see battery_charged_delay_ms=999
adb shell settings put global battery_charging_state_update_delay -1
adb shell dumpsys batterystats --settings # should see battery_charged_delay_ms=90000
Change-Id: Ic308af938836a1f9c235cec341808b6c6c28d22d
parent c1b889d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment