summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/ViewConfiguration.java
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2011-03-02 19:17:06 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-03-02 19:17:06 -0800
commit2da0c5826df40d9f528bfe7d2e762c3fbea03f7f (patch)
treeba23d0ff87d035f5933c5aa3ba082f985221899d /core/java/android/view/ViewConfiguration.java
parentf99c91c9cf780f925d493e60e1ec479073580434 (diff)
parent54d068ec6af0ee6d261a135400efe6816c6f5ffe (diff)
downloadframeworks_base-2da0c5826df40d9f528bfe7d2e762c3fbea03f7f.zip
frameworks_base-2da0c5826df40d9f528bfe7d2e762c3fbea03f7f.tar.gz
frameworks_base-2da0c5826df40d9f528bfe7d2e762c3fbea03f7f.tar.bz2
Merge "Add system wide management of core settings"
Diffstat (limited to 'core/java/android/view/ViewConfiguration.java')
-rw-r--r--core/java/android/view/ViewConfiguration.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java
index cc4e89c..d95c5b0 100644
--- a/core/java/android/view/ViewConfiguration.java
+++ b/core/java/android/view/ViewConfiguration.java
@@ -16,8 +16,11 @@
package android.view;
+import android.app.AppGlobals;
import android.content.Context;
import android.content.res.Configuration;
+import android.os.Bundle;
+import android.provider.Settings;
import android.util.DisplayMetrics;
import android.util.SparseArray;
@@ -74,7 +77,7 @@ public class ViewConfiguration {
* Defines the duration in milliseconds before a press turns into
* a long press
*/
- private static final int LONG_PRESS_TIMEOUT = 500;
+ private static final int DEFAULTLONG_PRESS_TIMEOUT = 500;
/**
* Defines the duration in milliseconds a user needs to hold down the
@@ -320,15 +323,16 @@ public class ViewConfiguration {
public static int getPressedStateDuration() {
return PRESSED_STATE_DURATION;
}
-
+
/**
* @return the duration in milliseconds before a press turns into
* a long press
*/
public static int getLongPressTimeout() {
- return LONG_PRESS_TIMEOUT;
+ return AppGlobals.getIntCoreSetting(Settings.Secure.LONG_PRESS_TIMEOUT,
+ DEFAULTLONG_PRESS_TIMEOUT);
}
-
+
/**
* @return 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