Loading core/java/android/hardware/input/InputSettings.java +52 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,13 @@ public class InputSettings { */ public static final float DEFAULT_MOUSE_KEYS_ACCELERATION = .2f; /** * The default max speed as a factor of the minimum speed for mouse keys movement. * * @hide */ public static final int DEFAULT_MOUSE_KEYS_MAX_SPEED = 5; /** * The maximum allowed obscuring opacity by UID to propagate touches (0 <= x <= 1). * @hide Loading Loading @@ -1140,6 +1147,51 @@ public class InputSettings { } /** * Get Accessibility mouse keys max speed. * * <p> * ‘Mouse keys’ is an accessibility feature to aid users who have physical disabilities, * that allows the user to use the keys on the keyboard to control the mouse pointer and * other perform other mouse functionality. * </p> * * @hide */ @FlaggedApi(FLAG_KEYBOARD_A11Y_MOUSE_KEYS) public static int getAccessibilityMouseKeysMaxSpeed(@NonNull Context context) { if (!isAccessibilityMouseKeysFeatureFlagEnabled()) { return 0; } return Settings.Secure.getIntForUser(context.getContentResolver(), Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_MAX_SPEED, DEFAULT_MOUSE_KEYS_MAX_SPEED, UserHandle.USER_CURRENT); } /** * Set Accessibility mouse keys max speed. * * <p> * ‘Mouse keys’ is an accessibility feature to aid users who have physical disabilities, * that allows the user to use the keys on the keyboard to control the mouse pointer and * other perform other mouse functionality. * </p> * * @hide */ @FlaggedApi(FLAG_KEYBOARD_A11Y_MOUSE_KEYS) @RequiresPermission(Manifest.permission.WRITE_SETTINGS) public static void setAccessibilityMouseKeysMaxSpeed(@NonNull Context context, int maxSpeed) { if (!isAccessibilityMouseKeysFeatureFlagEnabled()) { return; } Settings.Secure.putIntForUser(context.getContentResolver(), Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_MAX_SPEED, maxSpeed, UserHandle.USER_CURRENT); } /** * Whether "Repeat keys" feature flag is enabled. * Loading core/java/android/provider/Settings.java +8 −0 Original line number Diff line number Diff line Loading @@ -12971,6 +12971,14 @@ public final class Settings { public static final String ACCESSIBILITY_MOUSE_KEYS_ACCELERATION = "accessibility_mouse_keys_acceleration"; /** * The max speed as a factor of the minimum speed for mouse keys movement. * * @hide */ public static final String ACCESSIBILITY_MOUSE_KEYS_MAX_SPEED = "accessibility_mouse_keys_max_speed"; /** * Whether the Adaptive connectivity option is enabled. * Loading packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -241,6 +241,7 @@ public class SecureSettings { Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MAGNIFY_NAV_AND_IME, Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_ENABLED, Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_ACCELERATION, Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_MAX_SPEED, Settings.Secure.ACCESSIBILITY_PINCH_TO_ZOOM_ANYWHERE_ENABLED, Settings.Secure.ACCESSIBILITY_SINGLE_FINGER_PANNING_ENABLED, Settings.Secure.ODI_CAPTIONS_VOLUME_UI_ENABLED, Loading packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +2 −0 Original line number Diff line number Diff line Loading @@ -469,6 +469,8 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.ACCESSIBILITY_MOUSE_KEYS_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACCESSIBILITY_MOUSE_KEYS_ACCELERATION, new InclusiveIntegerRangeValidator(0, 10)); VALIDATORS.put(Secure.ACCESSIBILITY_MOUSE_KEYS_MAX_SPEED, new InclusiveIntegerRangeValidator(1, 10)); VALIDATORS.put(Secure.MANDATORY_BIOMETRICS, new InclusiveIntegerRangeValidator(0, 1)); VALIDATORS.put(Secure.MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED, new InclusiveIntegerRangeValidator(0, 1)); Loading Loading
core/java/android/hardware/input/InputSettings.java +52 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,13 @@ public class InputSettings { */ public static final float DEFAULT_MOUSE_KEYS_ACCELERATION = .2f; /** * The default max speed as a factor of the minimum speed for mouse keys movement. * * @hide */ public static final int DEFAULT_MOUSE_KEYS_MAX_SPEED = 5; /** * The maximum allowed obscuring opacity by UID to propagate touches (0 <= x <= 1). * @hide Loading Loading @@ -1140,6 +1147,51 @@ public class InputSettings { } /** * Get Accessibility mouse keys max speed. * * <p> * ‘Mouse keys’ is an accessibility feature to aid users who have physical disabilities, * that allows the user to use the keys on the keyboard to control the mouse pointer and * other perform other mouse functionality. * </p> * * @hide */ @FlaggedApi(FLAG_KEYBOARD_A11Y_MOUSE_KEYS) public static int getAccessibilityMouseKeysMaxSpeed(@NonNull Context context) { if (!isAccessibilityMouseKeysFeatureFlagEnabled()) { return 0; } return Settings.Secure.getIntForUser(context.getContentResolver(), Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_MAX_SPEED, DEFAULT_MOUSE_KEYS_MAX_SPEED, UserHandle.USER_CURRENT); } /** * Set Accessibility mouse keys max speed. * * <p> * ‘Mouse keys’ is an accessibility feature to aid users who have physical disabilities, * that allows the user to use the keys on the keyboard to control the mouse pointer and * other perform other mouse functionality. * </p> * * @hide */ @FlaggedApi(FLAG_KEYBOARD_A11Y_MOUSE_KEYS) @RequiresPermission(Manifest.permission.WRITE_SETTINGS) public static void setAccessibilityMouseKeysMaxSpeed(@NonNull Context context, int maxSpeed) { if (!isAccessibilityMouseKeysFeatureFlagEnabled()) { return; } Settings.Secure.putIntForUser(context.getContentResolver(), Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_MAX_SPEED, maxSpeed, UserHandle.USER_CURRENT); } /** * Whether "Repeat keys" feature flag is enabled. * Loading
core/java/android/provider/Settings.java +8 −0 Original line number Diff line number Diff line Loading @@ -12971,6 +12971,14 @@ public final class Settings { public static final String ACCESSIBILITY_MOUSE_KEYS_ACCELERATION = "accessibility_mouse_keys_acceleration"; /** * The max speed as a factor of the minimum speed for mouse keys movement. * * @hide */ public static final String ACCESSIBILITY_MOUSE_KEYS_MAX_SPEED = "accessibility_mouse_keys_max_speed"; /** * Whether the Adaptive connectivity option is enabled. * Loading
packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -241,6 +241,7 @@ public class SecureSettings { Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MAGNIFY_NAV_AND_IME, Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_ENABLED, Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_ACCELERATION, Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_MAX_SPEED, Settings.Secure.ACCESSIBILITY_PINCH_TO_ZOOM_ANYWHERE_ENABLED, Settings.Secure.ACCESSIBILITY_SINGLE_FINGER_PANNING_ENABLED, Settings.Secure.ODI_CAPTIONS_VOLUME_UI_ENABLED, Loading
packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +2 −0 Original line number Diff line number Diff line Loading @@ -469,6 +469,8 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.ACCESSIBILITY_MOUSE_KEYS_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ACCESSIBILITY_MOUSE_KEYS_ACCELERATION, new InclusiveIntegerRangeValidator(0, 10)); VALIDATORS.put(Secure.ACCESSIBILITY_MOUSE_KEYS_MAX_SPEED, new InclusiveIntegerRangeValidator(1, 10)); VALIDATORS.put(Secure.MANDATORY_BIOMETRICS, new InclusiveIntegerRangeValidator(0, 1)); VALIDATORS.put(Secure.MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED, new InclusiveIntegerRangeValidator(0, 1)); Loading