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
Loading
Please register or sign in to comment