Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02942145 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android Git Automerger
Browse files

am a1489d30: am 9aefa145: Merge "Send accessibility event for content change...

am a1489d30: am 9aefa145: Merge "Send accessibility event for content change upon setting content description." into jb-mr1-dev

* commit 'a1489d30':
  Send accessibility event for content change upon setting content description.
parents 8c17d23e a1489d30
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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();
    }
    /**