commit 2f0d38ee40afb815280a49be12997b0247bb36e4
long press power key to show global actions menu
diff --git a/frameworks/base/core/res/res/values/config.xml b/frameworks/base/core/res/res/values/config.xml
index 970e63b11f..d6c52ca4cd 100644
--- a/frameworks/base/core/res/res/values/config.xml
+++ b/frameworks/base/core/res/res/values/config.xml
@@ -977,7 +977,7 @@
4 - Go to voice assist
5 - Go to assistant (Settings.Secure.ASSISTANT)
-->
- <integer name="config_longPressOnPowerBehavior">5</integer>
+ <integer name="config_longPressOnPowerBehavior">1</integer>
<!-- The time in milliseconds after which a press on power button is considered "long". -->
<integer name="config_longPressOnPowerDurationMs">500</integer>
diff --git a/frameworks/base/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java b/frameworks/base/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
index 2ebcd85311..b0e94a0b88 100644
--- a/frameworks/base/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
+++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
@@ -579,8 +579,8 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
// make sure emergency affordance action is first, if needed
if (mEmergencyAffordanceManager.needsEmergencyAffordance()) {
- addIfShouldShowAction(tempActions, new EmergencyAffordanceAction());
- addedKeys.add(GLOBAL_ACTION_KEY_EMERGENCY);
+ //addIfShouldShowAction(tempActions, new EmergencyAffordanceAction());
+ //addedKeys.add(GLOBAL_ACTION_KEY_EMERGENCY);
}
for (int i = 0; i < defaultActions.length; i++) {
2022-11-28 AndroidS 长按power案件弹出关机界面
于 2022-11-28 18:08:33 首次发布