Loading core/java/android/provider/Settings.java +12 −0 Original line number Diff line number Diff line Loading @@ -8550,6 +8550,18 @@ public final class Settings { @Readable public static final String MULTI_PRESS_TIMEOUT = "multi_press_timeout"; /** * The duration before a key repeat begins in milliseconds. * @hide */ public static final String KEY_REPEAT_TIMEOUT_MS = "key_repeat_timeout"; /** * The duration between successive key repeats in milliseconds. * @hide */ public static final String KEY_REPEAT_DELAY_MS = "key_repeat_delay"; /** * Setting that specifies recommended timeout in milliseconds for controls * which don't need user's interactions. Loading core/java/android/view/ViewConfiguration.java +9 −4 Original line number Diff line number Diff line Loading @@ -85,9 +85,9 @@ public class ViewConfiguration { private static final int DEFAULT_MULTI_PRESS_TIMEOUT = 300; /** * Defines the time between successive key repeats in milliseconds. * Defines the default duration between successive key repeats in milliseconds. */ private static final int KEY_REPEAT_DELAY = 50; private static final int DEFAULT_KEY_REPEAT_DELAY_MS = 50; /** * Defines the duration in milliseconds a user needs to hold down the Loading Loading @@ -669,14 +669,19 @@ public class ViewConfiguration { * @return the time before the first key repeat in milliseconds. */ public static int getKeyRepeatTimeout() { return getLongPressTimeout(); // Before the key repeat timeout was introduced, some users relied on changing // LONG_PRESS_TIMEOUT settings to also change the key repeat timeout. To support // this backward compatibility, we'll use the long press timeout as default value. return AppGlobals.getIntCoreSetting(Settings.Secure.KEY_REPEAT_TIMEOUT_MS, getLongPressTimeout()); } /** * @return the time between successive key repeats in milliseconds. */ public static int getKeyRepeatDelay() { return KEY_REPEAT_DELAY; return AppGlobals.getIntCoreSetting(Settings.Secure.KEY_REPEAT_DELAY_MS, DEFAULT_KEY_REPEAT_DELAY_MS); } /** Loading core/proto/android/providers/settings/secure.proto +3 −1 Original line number Diff line number Diff line Loading @@ -374,6 +374,8 @@ message SecureSettingsProto { optional SettingProto lock_to_app_exit_locked = 33 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto lockdown_in_power_menu = 34 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto long_press_timeout = 35 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto key_press_timeout_ms = 96 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto key_press_delay_ms = 97 [ (android.privacy).dest = DEST_AUTOMATIC ]; message ManagedProfile { option (android.msg_privacy).dest = DEST_EXPLICIT; Loading Loading @@ -705,5 +707,5 @@ message SecureSettingsProto { // Please insert fields in alphabetical order and group them into messages // if possible (to avoid reaching the method limit). // Next tag = 96; // Next tag = 98; } packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java +2 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,8 @@ public class SecureSettings { Settings.Secure.DOUBLE_TAP_TO_WAKE, Settings.Secure.WAKE_GESTURE_ENABLED, Settings.Secure.LONG_PRESS_TIMEOUT, Settings.Secure.KEY_REPEAT_TIMEOUT_MS, Settings.Secure.KEY_REPEAT_DELAY_MS, Settings.Secure.CAMERA_GESTURE_DISABLED, Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED, Settings.Secure.ACCESSIBILITY_AUTOCLICK_DELAY, Loading packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +2 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,8 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.DOUBLE_TAP_TO_WAKE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.WAKE_GESTURE_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.LONG_PRESS_TIMEOUT, NON_NEGATIVE_INTEGER_VALIDATOR); VALIDATORS.put(Secure.KEY_REPEAT_TIMEOUT_MS, NON_NEGATIVE_INTEGER_VALIDATOR); VALIDATORS.put(Secure.KEY_REPEAT_DELAY_MS, NON_NEGATIVE_INTEGER_VALIDATOR); VALIDATORS.put(Secure.CAMERA_GESTURE_DISABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACCESSIBILITY_AUTOCLICK_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACCESSIBILITY_AUTOCLICK_DELAY, NON_NEGATIVE_INTEGER_VALIDATOR); Loading Loading
core/java/android/provider/Settings.java +12 −0 Original line number Diff line number Diff line Loading @@ -8550,6 +8550,18 @@ public final class Settings { @Readable public static final String MULTI_PRESS_TIMEOUT = "multi_press_timeout"; /** * The duration before a key repeat begins in milliseconds. * @hide */ public static final String KEY_REPEAT_TIMEOUT_MS = "key_repeat_timeout"; /** * The duration between successive key repeats in milliseconds. * @hide */ public static final String KEY_REPEAT_DELAY_MS = "key_repeat_delay"; /** * Setting that specifies recommended timeout in milliseconds for controls * which don't need user's interactions. Loading
core/java/android/view/ViewConfiguration.java +9 −4 Original line number Diff line number Diff line Loading @@ -85,9 +85,9 @@ public class ViewConfiguration { private static final int DEFAULT_MULTI_PRESS_TIMEOUT = 300; /** * Defines the time between successive key repeats in milliseconds. * Defines the default duration between successive key repeats in milliseconds. */ private static final int KEY_REPEAT_DELAY = 50; private static final int DEFAULT_KEY_REPEAT_DELAY_MS = 50; /** * Defines the duration in milliseconds a user needs to hold down the Loading Loading @@ -669,14 +669,19 @@ public class ViewConfiguration { * @return the time before the first key repeat in milliseconds. */ public static int getKeyRepeatTimeout() { return getLongPressTimeout(); // Before the key repeat timeout was introduced, some users relied on changing // LONG_PRESS_TIMEOUT settings to also change the key repeat timeout. To support // this backward compatibility, we'll use the long press timeout as default value. return AppGlobals.getIntCoreSetting(Settings.Secure.KEY_REPEAT_TIMEOUT_MS, getLongPressTimeout()); } /** * @return the time between successive key repeats in milliseconds. */ public static int getKeyRepeatDelay() { return KEY_REPEAT_DELAY; return AppGlobals.getIntCoreSetting(Settings.Secure.KEY_REPEAT_DELAY_MS, DEFAULT_KEY_REPEAT_DELAY_MS); } /** Loading
core/proto/android/providers/settings/secure.proto +3 −1 Original line number Diff line number Diff line Loading @@ -374,6 +374,8 @@ message SecureSettingsProto { optional SettingProto lock_to_app_exit_locked = 33 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto lockdown_in_power_menu = 34 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto long_press_timeout = 35 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto key_press_timeout_ms = 96 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto key_press_delay_ms = 97 [ (android.privacy).dest = DEST_AUTOMATIC ]; message ManagedProfile { option (android.msg_privacy).dest = DEST_EXPLICIT; Loading Loading @@ -705,5 +707,5 @@ message SecureSettingsProto { // Please insert fields in alphabetical order and group them into messages // if possible (to avoid reaching the method limit). // Next tag = 96; // Next tag = 98; }
packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java +2 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,8 @@ public class SecureSettings { Settings.Secure.DOUBLE_TAP_TO_WAKE, Settings.Secure.WAKE_GESTURE_ENABLED, Settings.Secure.LONG_PRESS_TIMEOUT, Settings.Secure.KEY_REPEAT_TIMEOUT_MS, Settings.Secure.KEY_REPEAT_DELAY_MS, Settings.Secure.CAMERA_GESTURE_DISABLED, Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED, Settings.Secure.ACCESSIBILITY_AUTOCLICK_DELAY, Loading
packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +2 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,8 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.DOUBLE_TAP_TO_WAKE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.WAKE_GESTURE_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.LONG_PRESS_TIMEOUT, NON_NEGATIVE_INTEGER_VALIDATOR); VALIDATORS.put(Secure.KEY_REPEAT_TIMEOUT_MS, NON_NEGATIVE_INTEGER_VALIDATOR); VALIDATORS.put(Secure.KEY_REPEAT_DELAY_MS, NON_NEGATIVE_INTEGER_VALIDATOR); VALIDATORS.put(Secure.CAMERA_GESTURE_DISABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACCESSIBILITY_AUTOCLICK_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACCESSIBILITY_AUTOCLICK_DELAY, NON_NEGATIVE_INTEGER_VALIDATOR); Loading