summaryrefslogtreecommitdiff
path: root/core/java/android/widget/ScrollView.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2015-02-03 18:13:40 -0800
committerDianne Hackborn <hackbod@google.com>2015-02-06 10:42:44 -0800
commita7bb6fbeab933326d58aa806d8194b7b13239d34 (patch)
treef56d4455b6eec18420a982573b800fb0b6220ce1 /core/java/android/widget/ScrollView.java
parentb989c5561ea10e623d73e7bb89b37ac38ccdd908 (diff)
First quick implementation of auto assist data.
Introduce new AssistData class that contains all data the framework automatically generates for assist. Currently populated with a very simple tree structure representing the app's view hierarchy. Reworked how we populate the class name for accessibility info, so this is provided through a new method call on View that subclasses can override. This method is also used to populate the class name in AssistData. Change-Id: Ibd0acdc8354727d4291473283b5e4b70894905dc
Diffstat (limited to 'core/java/android/widget/ScrollView.java')
-rw-r--r--core/java/android/widget/ScrollView.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/widget/ScrollView.java b/core/java/android/widget/ScrollView.java
index 1098419990b4..b95c27d35208 100644
--- a/core/java/android/widget/ScrollView.java
+++ b/core/java/android/widget/ScrollView.java
@@ -839,11 +839,15 @@ public class ScrollView extends FrameLayout {
return false;
}
+ @Override
+ public CharSequence getAccessibilityClassName() {
+ return ScrollView.class.getName();
+ }
+
/** @hide */
@Override
public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) {
super.onInitializeAccessibilityNodeInfoInternal(info);
- info.setClassName(ScrollView.class.getName());
if (isEnabled()) {
final int scrollRange = getScrollRange();
if (scrollRange > 0) {
@@ -862,7 +866,6 @@ public class ScrollView extends FrameLayout {
@Override
public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) {
super.onInitializeAccessibilityEventInternal(event);
- event.setClassName(ScrollView.class.getName());
final boolean scrollable = getScrollRange() > 0;
event.setScrollable(scrollable);
event.setScrollX(mScrollX);