summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/PagedView.java
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2013-10-08 21:31:12 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-08 21:31:12 +0000
commitd4a55216c1b461d6e7dc20ab77a24bd3a53e3119 (patch)
treef1589ae48c131a8455b6075101538a6cc0382cbc /src/com/android/launcher3/PagedView.java
parentba65185edde8efeb2f3f450832308c2cc2807f40 (diff)
parent254139a3c74acec5fa34a73be4d159d6baabc6b1 (diff)
downloadandroid_packages_apps_Trebuchet-d4a55216c1b461d6e7dc20ab77a24bd3a53e3119.tar.gz
android_packages_apps_Trebuchet-d4a55216c1b461d6e7dc20ab77a24bd3a53e3119.tar.bz2
android_packages_apps_Trebuchet-d4a55216c1b461d6e7dc20ab77a24bd3a53e3119.zip
Merge "Fix scrolling accessibility events sent from PagedView" into jb-ub-now-indigo-rose
Diffstat (limited to 'src/com/android/launcher3/PagedView.java')
-rw-r--r--src/com/android/launcher3/PagedView.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 003b2db20..b209436d9 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -668,11 +668,10 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
if (am.isEnabled()) {
AccessibilityEvent ev =
AccessibilityEvent.obtain(AccessibilityEvent.TYPE_VIEW_SCROLLED);
- ev.getText().add("");
ev.setItemCount(getChildCount());
ev.setFromIndex(mCurrentPage);
- int action = AccessibilityNodeInfo.ACTION_SCROLL_FORWARD;
+ final int action;
if (getNextPage() >= mCurrentPage) {
action = AccessibilityNodeInfo.ACTION_SCROLL_FORWARD;
} else {
@@ -2754,6 +2753,14 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
}
@Override
+ public void sendAccessibilityEvent(int eventType) {
+ // Don't let the view send real scroll events.
+ if (eventType != AccessibilityEvent.TYPE_VIEW_SCROLLED) {
+ super.sendAccessibilityEvent(eventType);
+ }
+ }
+
+ @Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
super.onInitializeAccessibilityEvent(event);
event.setScrollable(true);