summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/accessibility/TouchExplorer.java
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2012-06-05 14:46:50 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2012-06-05 14:48:58 -0700
commite47957a0bbe2164467ff6e7a566b0c9e4689cdc9 (patch)
tree3b7e214111a43302ecc6cc298e9856c43a3e01bb /services/java/com/android/server/accessibility/TouchExplorer.java
parent1c20cc5c063bf4238309827176bb84b3e512e119 (diff)
downloadframeworks_base-e47957a0bbe2164467ff6e7a566b0c9e4689cdc9.zip
frameworks_base-e47957a0bbe2164467ff6e7a566b0c9e4689cdc9.tar.gz
frameworks_base-e47957a0bbe2164467ff6e7a566b0c9e4689cdc9.tar.bz2
Nodes with contentDescription should always be important for accessibility.
1. Now after setting the content description on a view we mark is as important for accessibility of the current important for accessibility mode of that view is auto. 2. Minor tweak to a touch explorer coefficient to make performing double tapping easier. bug:6615353 Change-Id: I3b477f533a3ebde85d425caf32ace5e851240f88
Diffstat (limited to 'services/java/com/android/server/accessibility/TouchExplorer.java')
-rw-r--r--services/java/com/android/server/accessibility/TouchExplorer.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/java/com/android/server/accessibility/TouchExplorer.java b/services/java/com/android/server/accessibility/TouchExplorer.java
index d97b022..7e88373 100644
--- a/services/java/com/android/server/accessibility/TouchExplorer.java
+++ b/services/java/com/android/server/accessibility/TouchExplorer.java
@@ -100,6 +100,9 @@ public class TouchExplorer {
// Temporary array for storing pointer IDs.
private final int[] mTempPointerIds = new int[MAX_POINTER_COUNT];
+ // Timeout before trying to decide what the user is trying to do.
+ private final int mDetermineUserIntentTimeout;
+
// Timeout within which we try to detect a tap.
private final int mTapTimeout;
@@ -199,6 +202,7 @@ public class TouchExplorer {
mInjectedPointerTracker = new InjectedPointerTracker();
mInputFilter = inputFilter;
mTapTimeout = ViewConfiguration.getTapTimeout();
+ mDetermineUserIntentTimeout = (int) (mTapTimeout * 1.5f);
mDoubleTapTimeout = ViewConfiguration.getDoubleTapTimeout();
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
mDoubleTapSlop = ViewConfiguration.get(context).getScaledDoubleTapSlop();
@@ -1332,7 +1336,7 @@ public class TouchExplorer {
mPrototype = MotionEvent.obtain(prototype);
mPointerIdBits = pointerIdBits;
mPolicyFlags = policyFlags;
- mHandler.postDelayed(this, mTapTimeout);
+ mHandler.postDelayed(this, mDetermineUserIntentTimeout);
}
public float getX() {