summaryrefslogtreecommitdiff
path: root/core/java/android/view/View.java
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2012-06-18 11:33:33 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-06-18 11:33:33 -0700
commitc32b2091d6441e7709342ca62f0976fc4a0367e4 (patch)
tree627fc0f08aae28b10d8aac0b79de1a2eaa5df388 /core/java/android/view/View.java
parent4fd225ca2dd4480dc694e7b8b2da8224db3d581c (diff)
parent45c4a8df9487f53af37ded1f5a1ebe500e89b493 (diff)
am 45c4a8df: am ec7c7ebf: Merge "API for finding accessibility focus in virtual tree not needed." into jb-dev
* commit '45c4a8df9487f53af37ded1f5a1ebe500e89b493': API for finding accessibility focus in virtual tree not needed.
Diffstat (limited to 'core/java/android/view/View.java')
-rw-r--r--core/java/android/view/View.java31
1 files changed, 3 insertions, 28 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 42421c5b51c6..25f65164c713 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -4552,31 +4552,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
if ((event.getEventType() & POPULATING_ACCESSIBILITY_EVENT_TYPES) != 0) {
dispatchPopulateAccessibilityEvent(event);
}
- // Intercept accessibility focus events fired by virtual nodes to keep
- // track of accessibility focus position in such nodes.
- final int eventType = event.getEventType();
- switch (eventType) {
- case AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED: {
- final long virtualNodeId = AccessibilityNodeInfo.getVirtualDescendantId(
- event.getSourceNodeId());
- if (virtualNodeId != AccessibilityNodeInfo.UNDEFINED) {
- ViewRootImpl viewRootImpl = getViewRootImpl();
- if (viewRootImpl != null) {
- viewRootImpl.setAccessibilityFocusedHost(this);
- }
- }
- } break;
- case AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED: {
- final long virtualNodeId = AccessibilityNodeInfo.getVirtualDescendantId(
- event.getSourceNodeId());
- if (virtualNodeId != AccessibilityNodeInfo.UNDEFINED) {
- ViewRootImpl viewRootImpl = getViewRootImpl();
- if (viewRootImpl != null) {
- viewRootImpl.setAccessibilityFocusedHost(null);
- }
- }
- } break;
- }
// In the beginning we called #isShown(), so we know that getParent() is not null.
getParent().requestSendAccessibilityEvent(this, event);
}
@@ -6300,7 +6275,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
mPrivateFlags2 |= ACCESSIBILITY_FOCUSED;
ViewRootImpl viewRootImpl = getViewRootImpl();
if (viewRootImpl != null) {
- viewRootImpl.setAccessibilityFocusedHost(this);
+ viewRootImpl.setAccessibilityFocus(this, null);
}
invalidate();
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED);
@@ -6331,7 +6306,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
if (viewRootImpl != null) {
View focusHost = viewRootImpl.getAccessibilityFocusedHost();
if (focusHost != null && ViewRootImpl.isViewDescendantOf(focusHost, this)) {
- viewRootImpl.setAccessibilityFocusedHost(null);
+ viewRootImpl.setAccessibilityFocus(null, null);
}
}
}
@@ -7942,7 +7917,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
// If the window does not have input focus we take away accessibility
// focus as soon as the user stop hovering over the view.
if (mAttachInfo != null && !mAttachInfo.mHasWindowFocus) {
- getViewRootImpl().setAccessibilityFocusedHost(null);
+ getViewRootImpl().setAccessibilityFocus(null, null);
}
}
}