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

Commit 28b70648 authored by Fan Zhang's avatar Fan Zhang
Browse files

Add config to fine tune emergency gesture min time

This is the minimum time user has to perform the gesture
for it to be considered valid.

Bug: 228395041
Test: atest
Change-Id: I7ce603e5530e13bf3552611c621a8e8b3cf5ab4c
parent e360c271
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -14270,6 +14270,14 @@ public final class Settings {
        public static final String EMERGENCY_GESTURE_POWER_BUTTON_COOLDOWN_PERIOD_MS =
                "emergency_gesture_power_button_cooldown_period_ms";
        /**
         * The minimum time in milliseconds to perform the emergency gesture.
         *
         * @hide
         */
        public static final String EMERGENCY_GESTURE_TAP_DETECTION_MIN_TIME_MS =
                "emergency_gesture_tap_detection_min_time_ms";
        /**
         * Whether to enable automatic system server heap dumps. This only works on userdebug or
         * eng builds, not on user builds. This is set by the user and overrides the config value.
+2 −0
Original line number Diff line number Diff line
@@ -87,6 +87,8 @@ public class GlobalSettingsValidators {
                Global.EMERGENCY_TONE, new DiscreteValueValidator(new String[] {"0", "1", "2"}));
        VALIDATORS.put(Global.EMERGENCY_GESTURE_POWER_BUTTON_COOLDOWN_PERIOD_MS,
                NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Global.EMERGENCY_GESTURE_TAP_DETECTION_MIN_TIME_MS,
                NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Global.CALL_AUTO_RETRY, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Global.DOCK_AUDIO_MEDIA_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(
+1 −0
Original line number Diff line number Diff line
@@ -257,6 +257,7 @@ public class SettingsBackupTest {
                    Settings.Global.DROPBOX_TAG_PREFIX,
                    Settings.Global.EMERGENCY_AFFORDANCE_NEEDED,
                    Settings.Global.EMERGENCY_GESTURE_POWER_BUTTON_COOLDOWN_PERIOD_MS,
                    Settings.Global.EMERGENCY_GESTURE_TAP_DETECTION_MIN_TIME_MS,
                    Settings.Global.EMULATE_DISPLAY_CUTOUT,
                    Settings.Global.ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED,
                    Settings.Global.ENABLE_CACHE_QUOTA_CALCULATION,