summaryrefslogtreecommitdiffstats
path: root/core/java/android/accessibilityservice
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2015-01-30 20:28:41 -0800
committerSvetoslav Ganov <svetoslavganov@google.com>2015-02-02 23:17:17 +0000
commitded133c446fa9d0d23e6bde19a66fb2ce3980491 (patch)
tree41f26af8f4fce5f667a3c167ff6ddfae503b9663 /core/java/android/accessibilityservice
parent175ddbcf2ed71fdcd44a9b64cdc5d479df496a4d (diff)
downloadframeworks_base-ded133c446fa9d0d23e6bde19a66fb2ce3980491.zip
frameworks_base-ded133c446fa9d0d23e6bde19a66fb2ce3980491.tar.gz
frameworks_base-ded133c446fa9d0d23e6bde19a66fb2ce3980491.tar.bz2
Fix broken activation of the selected view in accessibility mode.
We were using an approximation to determine where to send a pair of down and up events to click on the view that has accessibility focus. We were doing reverse computation to figuring out which portion of the view is not covered by interactive views and get a point in this region. However, determining whether a view is interactive is not feasible in general since for example may override onTouchEvent. This results in views not being activated or which is worse wrong views being activated. This change swithes to a new approach to activate views in accessibility mode which is guaranteed to always work except the very rare case of a view that overrides dispatchTouchEvent (which developers shouldn't be doing). The new approach is to flag the down and up events pair sent by the touch explorer as targeting the accessibility focused view. Such events are dispatched such that views predecessors of the accessibility focus do not handle them guaranteeing that these events reach the accessibiliy focused view. Once the accessibiliy focused view gets such an event it clears the flag and the event is dispatched following the normal event dispatch semantics. The new approach is semantically equivalent to requesting the view to perform a click accessiblitiy action but is more generic as it is not affected by views not implementing click action support correctly. bug:18986806 bug:18889611 Change-Id: Id4b7b886c9fd34f7eb11e606636d8e3bab122869
Diffstat (limited to 'core/java/android/accessibilityservice')
-rw-r--r--core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl4
1 files changed, 0 insertions, 4 deletions
diff --git a/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl b/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl
index 27a03b6..5f7a17d 100644
--- a/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl
+++ b/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl
@@ -54,10 +54,6 @@ interface IAccessibilityServiceConnection {
int action, in Bundle arguments, int interactionId,
IAccessibilityInteractionConnectionCallback callback, long threadId);
- boolean computeClickPointInScreen(int accessibilityWindowId, long accessibilityNodeId,
- int interactionId, IAccessibilityInteractionConnectionCallback callback,
- long threadId);
-
AccessibilityWindowInfo getWindow(int windowId);
List<AccessibilityWindowInfo> getWindows();