From bdca3e7e58805fb14e9e14a11db9d250ecb805a4 Mon Sep 17 00:00:00 2001 From: Josep del Rio Date: Wed, 11 Jan 2023 19:09:15 +0000 Subject: [PATCH] Add comment detailing MAX_RANGE Followup on ag/20930150; add a comment to explain why we need to limit the amount of ranges. Bug: 220115129 Test: no code change, only a comment Change-Id: I7ce1ebdc1c1dcd5474639ec9506b0e5b9df02498 --- core/java/android/view/InputDevice.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java index 8683cc2a80097..d4bc925c046ba 100644 --- a/core/java/android/view/InputDevice.java +++ b/core/java/android/view/InputDevice.java @@ -446,6 +446,7 @@ public final class InputDevice implements Parcelable { */ public static final int KEYBOARD_TYPE_ALPHABETIC = 2; + // Cap motion ranges to prevent attacks (b/25637534) private static final int MAX_RANGES = 1000; private static final int VIBRATOR_ID_ALL = -1;