summaryrefslogtreecommitdiff
path: root/core/java/android/view/ViewConfiguration.java
diff options
context:
space:
mode:
authorEugene Susla <eugenesusla@google.com>2017-10-19 14:00:59 -0700
committerEugene Susla <eugenesusla@google.com>2017-10-19 14:40:11 -0700
commit5f19cd3edadd2bb867d196f699abdc44f0c0cbcf (patch)
tree606cb7cca62f2efbecc9ed1913a80fb8b046b378 /core/java/android/view/ViewConfiguration.java
parent00d31c2760629e18088bcbfe2fe1c01e266bb866 (diff)
Reduce a11y shortcut timeout after dialog confirmation
Bug: 63914635 Test: ensure shortcut delay is still 3sec before dialog confirmation and 1.5sec afterwards Change-Id: Ifbc25dd2a3915809b570719ad79fbc83016989a6
Diffstat (limited to 'core/java/android/view/ViewConfiguration.java')
-rw-r--r--core/java/android/view/ViewConfiguration.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java
index 574137b30f1e..45008627e019 100644
--- a/core/java/android/view/ViewConfiguration.java
+++ b/core/java/android/view/ViewConfiguration.java
@@ -84,12 +84,17 @@ public class ViewConfiguration {
/**
* Defines the duration in milliseconds a user needs to hold down the
- * appropriate button to bring up the accessibility shortcut (first time) or enable it
- * (once shortcut is configured).
+ * appropriate button to bring up the accessibility shortcut for the first time
*/
private static final int A11Y_SHORTCUT_KEY_TIMEOUT = 3000;
/**
+ * Defines the duration in milliseconds a user needs to hold down the
+ * appropriate button to enable the accessibility shortcut once it's configured.
+ */
+ private static final int A11Y_SHORTCUT_KEY_TIMEOUT_AFTER_CONFIRMATION = 1500;
+
+ /**
* Defines the duration in milliseconds we will wait to see if a touch event
* is a tap or a scroll. If the user does not move within this interval, it is
* considered to be a tap.
@@ -851,6 +856,15 @@ public class ViewConfiguration {
}
/**
+ * @return The amount of time a user needs to press the relevant keys to activate the
+ * accessibility shortcut after it's confirmed that accessibility shortcut is used.
+ * @hide
+ */
+ public long getAccessibilityShortcutKeyTimeoutAfterConfirmation() {
+ return A11Y_SHORTCUT_KEY_TIMEOUT_AFTER_CONFIRMATION;
+ }
+
+ /**
* The amount of friction applied to scrolls and flings.
*
* @return A scalar dimensionless value representing the coefficient of