From 3c19b2573eb005d378288d0a43a2acca9b16f174 Mon Sep 17 00:00:00 2001 From: Asmita Poddar Date: Thu, 12 Sep 2024 14:08:24 +0000 Subject: Allow users to turn off key repeats Allow users to turn off key repeats. Add it as a setting and the corresponding APIs to get/set key repeat enabled. Key repeats will be a regular physical keyboard setting rather than an a11y setting, so update the APIs to reflect that. Bug: 336585002 Test: atest InputDispatcherKeyRepeatTest Flag: com.android.input.flags.keyboard_repeat_keys Change-Id: I2fb0f1746699b6be5748da41dd08ed8c38e96a5f --- .../Input/src/com/android/server/input/InputManagerServiceTests.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/Input/src') diff --git a/tests/Input/src/com/android/server/input/InputManagerServiceTests.kt b/tests/Input/src/com/android/server/input/InputManagerServiceTests.kt index 8829f74f5092..854fa4358fb3 100644 --- a/tests/Input/src/com/android/server/input/InputManagerServiceTests.kt +++ b/tests/Input/src/com/android/server/input/InputManagerServiceTests.kt @@ -157,9 +157,10 @@ class InputManagerServiceTests { verify(native).setMotionClassifierEnabled(anyBoolean()) verify(native).setMaximumObscuringOpacityForTouch(anyFloat()) verify(native).setStylusPointerIconEnabled(anyBoolean()) - // Called twice at boot, since there are individual callbacks to update the - // key repeat timeout and the key repeat delay. - verify(native, times(2)).setKeyRepeatConfiguration(anyInt(), anyInt()) + // Called thrice at boot, since there are individual callbacks to update the + // key repeat timeout, the key repeat delay and whether key repeat enabled. + verify(native, times(3)).setKeyRepeatConfiguration(anyInt(), anyInt(), + anyBoolean()) } @Test -- cgit v1.2.3-59-g8ed1b