summaryrefslogtreecommitdiff
path: root/core/java/android/view/ViewConfiguration.java
diff options
context:
space:
mode:
authorJustin Koh <justinkoh@google.com>2014-05-02 17:33:48 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-02 17:33:48 +0000
commitf46009225bc06b0c6f0230b9f8585a81d8857477 (patch)
treeab05a8e14a907f7b3ec0e80e6497a5d1989156f9 /core/java/android/view/ViewConfiguration.java
parent698a7ab344fc9ad88ea06599c957100df30abac2 (diff)
parent9abf0b9031d0ddc33970589d2fb88065d15de712 (diff)
am 9abf0b90: am 60158445: Merge "Make global action key timeout configurable." into klp-modular-dev
* commit '9abf0b9031d0ddc33970589d2fb88065d15de712': Make global action key timeout configurable.
Diffstat (limited to 'core/java/android/view/ViewConfiguration.java')
-rw-r--r--core/java/android/view/ViewConfiguration.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java
index 48a5bd55a136..20ef429eaf45 100644
--- a/core/java/android/view/ViewConfiguration.java
+++ b/core/java/android/view/ViewConfiguration.java
@@ -234,6 +234,7 @@ public class ViewConfiguration {
private final int mOverscrollDistance;
private final int mOverflingDistance;
private final boolean mFadingMarqueeEnabled;
+ private final long mGlobalActionsKeyTimeout;
private boolean sHasPermanentMenuKey;
private boolean sHasPermanentMenuKeySet;
@@ -261,6 +262,7 @@ public class ViewConfiguration {
mOverscrollDistance = OVERSCROLL_DISTANCE;
mOverflingDistance = OVERFLING_DISTANCE;
mFadingMarqueeEnabled = true;
+ mGlobalActionsKeyTimeout = GLOBAL_ACTIONS_KEY_TIMEOUT;
}
/**
@@ -342,6 +344,8 @@ public class ViewConfiguration {
com.android.internal.R.dimen.config_viewMinFlingVelocity);
mMaximumFlingVelocity = res.getDimensionPixelSize(
com.android.internal.R.dimen.config_viewMaxFlingVelocity);
+ mGlobalActionsKeyTimeout = res.getInteger(
+ com.android.internal.R.integer.config_globalActionsKeyTimeout);
}
/**
@@ -698,12 +702,24 @@ public class ViewConfiguration {
*
* @return how long a user needs to press the relevant key to bring up
* the global actions dialog.
+ * @deprecated use getDeviceGlobalActionKeyTimeout
*/
public static long getGlobalActionKeyTimeout() {
return GLOBAL_ACTIONS_KEY_TIMEOUT;
}
/**
+ * The amount of time a user needs to press the relevant key to bring up
+ * the global actions dialog.
+ *
+ * @return how long a user needs to press the relevant key to bring up
+ * the global actions dialog.
+ */
+ public long getDeviceGlobalActionKeyTimeout() {
+ return mGlobalActionsKeyTimeout;
+ }
+
+ /**
* The amount of friction applied to scrolls and flings.
*
* @return A scalar dimensionless value representing the coefficient of