summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2011-10-11 18:19:10 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2011-10-11 18:22:16 -0700
commit2e1c66bd53d30d2148afaa4b393b60cd59976d65 (patch)
tree73c8f66eec1ab6df0a0f667f49be1dbf0ad83d1c /services/java
parent99f36683a4f2c218d52922ae7c2a0c0b3f2890ed (diff)
downloadframeworks_base-2e1c66bd53d30d2148afaa4b393b60cd59976d65.zip
frameworks_base-2e1c66bd53d30d2148afaa4b393b60cd59976d65.tar.gz
frameworks_base-2e1c66bd53d30d2148afaa4b393b60cd59976d65.tar.bz2
Dragging in touch explore mode should not become exploring.
In touch exploration two fingers in the same direction drag and if one of them goes up the other starts to touch explore. This however causes inadvertent touch exploring to happen on almost every scroll causing confusion. Now two finger drag and they should both go up to allow exploring. This way the inadvertent exploring is gone and user experience is much better. bug:5440411 Change-Id: Id8aaece92e5dea1fc740400d2adc9dd63a1674e4
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/accessibility/TouchExplorer.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/services/java/com/android/server/accessibility/TouchExplorer.java b/services/java/com/android/server/accessibility/TouchExplorer.java
index 5875ee3..3c6b416 100644
--- a/services/java/com/android/server/accessibility/TouchExplorer.java
+++ b/services/java/com/android/server/accessibility/TouchExplorer.java
@@ -457,6 +457,9 @@ public class TouchExplorer implements Explorer {
case MotionEvent.ACTION_MOVE: {
final int activePointerCount = mPointerTracker.getActivePointerCount();
switch (activePointerCount) {
+ case 1: {
+ // do nothing
+ } break;
case 2: {
if (isDraggingGesture(event)) {
// If still dragging send a drag event.
@@ -484,10 +487,12 @@ public class TouchExplorer implements Explorer {
}
} break;
case MotionEvent.ACTION_POINTER_UP: {
- mCurrentState = STATE_TOUCH_EXPLORING;
// Send an event to the end of the drag gesture.
sendMotionEvent(event, MotionEvent.ACTION_UP, pointerIdBits, policyFlags);
} break;
+ case MotionEvent.ACTION_UP: {
+ mCurrentState = STATE_TOUCH_EXPLORING;
+ } break;
case MotionEvent.ACTION_CANCEL: {
clear();
} break;
@@ -500,7 +505,7 @@ public class TouchExplorer implements Explorer {
* @param event The event to be handled.
* @param policyFlags The policy flags associated with the event.
*/
- public void handleMotionEventStateDelegating(MotionEvent event, int policyFlags) {
+ private void handleMotionEventStateDelegating(MotionEvent event, int policyFlags) {
switch (event.getActionMasked()) {
case MotionEvent.ACTION_DOWN: {
throw new IllegalStateException("Delegating state can only be reached if "