From fb1e80a247221ee7e8f5c5deba04812021d9d07e Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Wed, 16 May 2012 17:33:19 -0700 Subject: Exposing some accessiblity actions only for enabled views. 1. Some accessibility actions should not be performed on disabled views. For example, scrolling should not be permitted while accessibility focus should be. Made a quick pass over the actions we expose now. Change-Id: I36626dfbc0d2f480309a910f58f1de64e9e05675 --- core/java/android/widget/TextView.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/java/android/widget/TextView.java') diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index fc56e116ac08..112881cb19b7 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -7739,8 +7739,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener info.setText(getTextForAccessibility()); } - if (TextUtils.isEmpty(getContentDescription()) - && !TextUtils.isEmpty(mText)) { + if (TextUtils.isEmpty(getContentDescription()) && !TextUtils.isEmpty(mText)) { info.addAction(AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY); info.addAction(AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY); info.setMovementGranularities(AccessibilityNodeInfo.MOVEMENT_GRANULARITY_CHARACTER -- cgit v1.2.3