Loading core/java/android/provider/Settings.java +10 −0 Original line number Diff line number Diff line Loading @@ -15130,6 +15130,16 @@ public final class Settings { public static final String POWER_BUTTON_LONG_PRESS = "power_button_long_press"; /** * Override internal R.integer.config_longPressOnPowerDurationMs. It determines the length * of power button press to be considered a long press in milliseconds. * Used by PhoneWindowManager. * @hide */ @Readable public static final String POWER_BUTTON_LONG_PRESS_DURATION_MS = "power_button_long_press_duration_ms"; /** * Overrides internal R.integer.config_veryLongPressOnPowerBehavior. * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. core/proto/android/providers/settings/global.proto +3 −1 Original line number Diff line number Diff line Loading @@ -771,6 +771,8 @@ message GlobalSettingsProto { optional SettingProto power_manager_constants = 93; reserved 94; // Used to be priv_app_oob_enabled optional SettingProto power_button_long_press_duration_ms = 154 [ (android.privacy).dest = DEST_AUTOMATIC ]; message PrepaidSetup { option (android.msg_privacy).dest = DEST_EXPLICIT; Loading Loading @@ -1063,5 +1065,5 @@ message GlobalSettingsProto { // Please insert fields in alphabetical order and group them into messages // if possible (to avoid reaching the method limit). // Next tag = 154; // Next tag = 155; } core/res/res/values/config.xml +14 −0 Original line number Diff line number Diff line Loading @@ -971,6 +971,20 @@ --> <integer name="config_longPressOnPowerBehavior">5</integer> <!-- The time in milliseconds after which a press on power button is considered "long". --> <integer name="config_longPressOnPowerDurationMs">500</integer> <!-- The possible UI options to be surfaced for configuring long press power on duration action. Value set in config_longPressOnPowerDurationMs should be one of the available options to allow users to restore default. --> <integer-array name="config_longPressOnPowerDurationSettings"> <item>250</item> <item>350</item> <item>500</item> <item>650</item> <item>750</item> </integer-array> <!-- Whether the setting to change long press on power behaviour from default to assistant (5) is available in Settings. --> Loading core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -439,6 +439,8 @@ <java-symbol type="integer" name="config_extraFreeKbytesAbsolute" /> <java-symbol type="integer" name="config_immersive_mode_confirmation_panic" /> <java-symbol type="integer" name="config_longPressOnPowerBehavior" /> <java-symbol type="integer" name="config_longPressOnPowerDurationMs" /> <java-symbol type="array" name="config_longPressOnPowerDurationSettings" /> <java-symbol type="bool" name="config_longPressOnPowerForAssistantSettingAvailable" /> <java-symbol type="integer" name="config_veryLongPressOnPowerBehavior" /> <java-symbol type="integer" name="config_veryLongPressTimeout" /> Loading packages/SettingsProvider/src/android/provider/settings/backup/GlobalSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -81,5 +81,6 @@ public class GlobalSettings { Settings.Global.POWER_BUTTON_LONG_PRESS, Settings.Global.AUTOMATIC_POWER_SAVE_MODE, Settings.Global.ADVANCED_BATTERY_USAGE_AMOUNT, Settings.Global.POWER_BUTTON_LONG_PRESS_DURATION_MS }; } Loading
core/java/android/provider/Settings.java +10 −0 Original line number Diff line number Diff line Loading @@ -15130,6 +15130,16 @@ public final class Settings { public static final String POWER_BUTTON_LONG_PRESS = "power_button_long_press"; /** * Override internal R.integer.config_longPressOnPowerDurationMs. It determines the length * of power button press to be considered a long press in milliseconds. * Used by PhoneWindowManager. * @hide */ @Readable public static final String POWER_BUTTON_LONG_PRESS_DURATION_MS = "power_button_long_press_duration_ms"; /** * Overrides internal R.integer.config_veryLongPressOnPowerBehavior. * Allowable values detailed in frameworks/base/core/res/res/values/config.xml.
core/proto/android/providers/settings/global.proto +3 −1 Original line number Diff line number Diff line Loading @@ -771,6 +771,8 @@ message GlobalSettingsProto { optional SettingProto power_manager_constants = 93; reserved 94; // Used to be priv_app_oob_enabled optional SettingProto power_button_long_press_duration_ms = 154 [ (android.privacy).dest = DEST_AUTOMATIC ]; message PrepaidSetup { option (android.msg_privacy).dest = DEST_EXPLICIT; Loading Loading @@ -1063,5 +1065,5 @@ message GlobalSettingsProto { // Please insert fields in alphabetical order and group them into messages // if possible (to avoid reaching the method limit). // Next tag = 154; // Next tag = 155; }
core/res/res/values/config.xml +14 −0 Original line number Diff line number Diff line Loading @@ -971,6 +971,20 @@ --> <integer name="config_longPressOnPowerBehavior">5</integer> <!-- The time in milliseconds after which a press on power button is considered "long". --> <integer name="config_longPressOnPowerDurationMs">500</integer> <!-- The possible UI options to be surfaced for configuring long press power on duration action. Value set in config_longPressOnPowerDurationMs should be one of the available options to allow users to restore default. --> <integer-array name="config_longPressOnPowerDurationSettings"> <item>250</item> <item>350</item> <item>500</item> <item>650</item> <item>750</item> </integer-array> <!-- Whether the setting to change long press on power behaviour from default to assistant (5) is available in Settings. --> Loading
core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -439,6 +439,8 @@ <java-symbol type="integer" name="config_extraFreeKbytesAbsolute" /> <java-symbol type="integer" name="config_immersive_mode_confirmation_panic" /> <java-symbol type="integer" name="config_longPressOnPowerBehavior" /> <java-symbol type="integer" name="config_longPressOnPowerDurationMs" /> <java-symbol type="array" name="config_longPressOnPowerDurationSettings" /> <java-symbol type="bool" name="config_longPressOnPowerForAssistantSettingAvailable" /> <java-symbol type="integer" name="config_veryLongPressOnPowerBehavior" /> <java-symbol type="integer" name="config_veryLongPressTimeout" /> Loading
packages/SettingsProvider/src/android/provider/settings/backup/GlobalSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -81,5 +81,6 @@ public class GlobalSettings { Settings.Global.POWER_BUTTON_LONG_PRESS, Settings.Global.AUTOMATIC_POWER_SAVE_MODE, Settings.Global.ADVANCED_BATTERY_USAGE_AMOUNT, Settings.Global.POWER_BUTTON_LONG_PRESS_DURATION_MS }; }