summaryrefslogtreecommitdiff
path: root/tests/Input/src
diff options
context:
space:
mode:
author Asmita Poddar <asmitapoddar@google.com> 2024-09-12 14:08:24 +0000
committer Asmita Poddar <asmitapoddar@google.com> 2024-09-18 13:33:17 +0000
commit3c19b2573eb005d378288d0a43a2acca9b16f174 (patch)
tree8b71c91e740e966d48eab3282b864f167b1a6988 /tests/Input/src
parentba505abdc8667ca7ac0265d4518600e98602cceb (diff)
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
Diffstat (limited to 'tests/Input/src')
-rw-r--r--tests/Input/src/com/android/server/input/InputManagerServiceTests.kt7
1 files changed, 4 insertions, 3 deletions
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