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

Commit 314b44a1 authored by Raul E Rangel's avatar Raul E Rangel Committed by Raul Rangel
Browse files

SettingsProvider: Change default for def_stay_on_while_pluggd_in

STAY_ON_WHILE_PLUGGED_IN is a bit field. It currently has a default of
BATTERY_PLUGGED_AC. Desktop devices require BATTERY_PLUGGED_USB to be
enabled. This change makes it so that when `stay_on_while_plugged_in` is
set to `true` we set the bit field to `BATTERY_PLUGGED_ANY`. This
matches what the Settings UI does when a user manually checks the stay
awake checkbox.

https://cs.android.com/android/platform/superproject/main/+/main:packages/apps/Settings/src/com/android/settings/development/StayAwakePreferenceController.java;l=51;drc=97b516365117de515b633aac92d0fc940bd953b3

Bug: 403621105
Test: Set def_stay_on_while_plugged_in to true
Test: Use `adb shell settings get global stay_on_while_plugged_in` to verify flag before and after the flag was set.
Flag: com.android.providers.settings.use_new_stay_on_while_plugged_in_default
Change-Id: I98ff15959abf4e066053e3472eaa633bb746c677
parent fb75ed92
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