diff options
Diffstat (limited to 'core/java/android/view/View.java')
| -rw-r--r-- | core/java/android/view/View.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 22243b1..608bdd7 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -5214,11 +5214,19 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ @RemotableViewMethod public void setContentDescription(CharSequence contentDescription) { + if (mContentDescription == null) { + if (contentDescription == null) { + return; + } + } else if (mContentDescription.equals(contentDescription)) { + return; + } mContentDescription = contentDescription; final boolean nonEmptyDesc = contentDescription != null && contentDescription.length() > 0; if (nonEmptyDesc && getImportantForAccessibility() == IMPORTANT_FOR_ACCESSIBILITY_AUTO) { setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES); } + notifyAccessibilityStateChanged(); } /** |
