summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/accessibility/EventStreamTransformation.java
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2012-10-01 16:25:08 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2012-10-02 12:02:05 -0700
commit45af84a483165f06c04d74baba67f90da29c6ad2 (patch)
treeb033e50c11473892a162251c0664b847c9a2ee18 /services/java/com/android/server/accessibility/EventStreamTransformation.java
parentbfbf6e1232013a999f4776f7fdf7cf6fb577f89b (diff)
downloadframeworks_base-45af84a483165f06c04d74baba67f90da29c6ad2.zip
frameworks_base-45af84a483165f06c04d74baba67f90da29c6ad2.tar.gz
frameworks_base-45af84a483165f06c04d74baba67f90da29c6ad2.tar.bz2
Touch explorer and magnifier do not work well together.
1. If tocuh exploration and screen magnification are enabled and the screen is currently magnified, gesture detection does not work well. The reason is because we are transforming the events if the screen is magnified before passing them to the touch explorer to compensate for the magnification so the user can poke what he thinks he pokes. However, when doing gesture detection/velocity computing this compensating shrinks the gestured shape/ decreases velocity leading to poor gesture reco/incorrect velocity. This change adds a onRawMotionEvent method in the event transformation chain which will process the raw touch events. In this method of the touch explorer we are passing events to the gesture recognized and the velocity tracker. 2. Velocity tracker was not cleared on transitions out of touch exploring state which is the only one that uses velocity. bug:7266617 Change-Id: I7887fe5f3c3bb6cfa203b7866a145c7341098a02
Diffstat (limited to 'services/java/com/android/server/accessibility/EventStreamTransformation.java')
-rw-r--r--services/java/com/android/server/accessibility/EventStreamTransformation.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/services/java/com/android/server/accessibility/EventStreamTransformation.java b/services/java/com/android/server/accessibility/EventStreamTransformation.java
index b715570..3289a15 100644
--- a/services/java/com/android/server/accessibility/EventStreamTransformation.java
+++ b/services/java/com/android/server/accessibility/EventStreamTransformation.java
@@ -57,12 +57,15 @@ import android.view.accessibility.AccessibilityEvent;
interface EventStreamTransformation {
/**
- * Receives a motion event.
+ * Receives motion event. Passed are the event transformed by previous
+ * transformations and the raw event to which no transformations have
+ * been applied.
*
- * @param event The motion event.
+ * @param event The transformed motion event.
+ * @param rawEvent The raw motion event.
* @param policyFlags Policy flags for the event.
*/
- public void onMotionEvent(MotionEvent event, int policyFlags);
+ public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags);
/**
* Receives an accessibility event.