From e6bbefb768263d3ed5ad19879a554bd1c84b136a Mon Sep 17 00:00:00 2001 From: Vadim Tryshev Date: Tue, 3 Apr 2018 13:38:06 -0700 Subject: Making task list carousel accessibility-scrollable No pane titles yet, as they are not yet reasonably supported by Talkback. Bug: 72409756 Test: Manual Change-Id: I3d2317b9180ac6b02977a4ee8212ae30f0533b2f --- src/com/android/launcher3/PagedView.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 1e761e41d..79993c11a 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -41,6 +41,7 @@ import android.view.ViewParent; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityNodeInfo; import android.view.animation.Interpolator; +import android.widget.ScrollView; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.pageindicators.PageIndicator; @@ -1467,6 +1468,13 @@ public abstract class PagedView extends ViewGrou if (getNextPage() < getChildCount() -1) snapToPage(getNextPage() + 1); } + @Override + public CharSequence getAccessibilityClassName() { + // Some accessibility services have special logic for ScrollView. Since we provide same + // accessibility info as ScrollView, inform the service to handle use the same way. + return ScrollView.class.getName(); + } + /* Accessibility */ @SuppressWarnings("deprecation") @Override @@ -1479,7 +1487,6 @@ public abstract class PagedView extends ViewGrou if (getCurrentPage() > 0) { info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD); } - info.setClassName(getClass().getName()); // Accessibility-wise, PagedView doesn't support long click, so disabling it. // Besides disabling the accessibility long-click, this also prevents this view from getting -- cgit v1.2.3