int offsetY = getViewportOffsetY();
// Update the viewport offsets
- mViewport.offset(offsetX, offsetY);
+ mViewport.offset(offsetX, offsetY);
final int startIndex = mIsRtl ? childCount - 1 : 0;
final int endIndex = mIsRtl ? -1 : childCount;
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
+ // accessibility focus.
+ info.setLongClickable(false);
+ if (Utilities.isLmpOrAbove()) {
+ info.removeAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_LONG_CLICK);
+ }
}
@Override
// Disable multitouch across the workspace/all apps/customize tray
setMotionEventSplittingEnabled(true);
- setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
}
@Override
for (int i = numCustomPages(); i < total; i++) {
updateAccessibilityFlags((CellLayout) getPageAt(i), i);
}
- if (mState == State.NORMAL) {
- setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
- } else {
- setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
- }
} else {
int accessible = mState == State.NORMAL ?
- IMPORTANT_FOR_ACCESSIBILITY_NO :
+ IMPORTANT_FOR_ACCESSIBILITY_AUTO :
IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS;
setImportantForAccessibility(accessible);
}
page.setAccessibilityDelegate(mPagesAccessibilityDelegate);
} else {
int accessible = mState == State.NORMAL ?
- IMPORTANT_FOR_ACCESSIBILITY_NO :
+ IMPORTANT_FOR_ACCESSIBILITY_AUTO :
IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS;
page.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
page.getShortcutsAndWidgets().setImportantForAccessibility(accessible);