diff options
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher3/PagedView.java | 11 |
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); |