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

Commit 9aefa145 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "Send accessibility event for content change upon setting content...

Merge "Send accessibility event for content change upon setting content description." into jb-mr1-dev
parents 092ad66a b708f770
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();
    }
    /**