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

Commit e261e283 authored by Svetoslav Ganov's avatar Svetoslav Ganov
Browse files

Add content description setter to RemoteViews

bug:5480389

Change-Id: I66616f379a244ba7f3552d766f3aaa77f207550a
parent 29a15a23
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -26782,6 +26782,7 @@ package android.widget {
    method public void setChar(int, java.lang.String, char);
    method public void setCharSequence(int, java.lang.String, java.lang.CharSequence);
    method public void setChronometer(int, long, java.lang.String, boolean);
    method public void setContentDescription(int, java.lang.CharSequence);
    method public void setDisplayedChild(int, int);
    method public void setDouble(int, java.lang.String, double);
    method public void setEmptyView(int, int);
+1 −0
Original line number Diff line number Diff line
@@ -4219,6 +4219,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
     *
     * @attr ref android.R.styleable#View_contentDescription
     */
    @RemotableViewMethod
    public void setContentDescription(CharSequence contentDescription) {
        mContentDescription = contentDescription;
    }
+10 −0
Original line number Diff line number Diff line
@@ -1545,6 +1545,16 @@ public class RemoteViews implements Parcelable, Filter {
        addAction(new ReflectionAction(viewId, methodName, ReflectionAction.INTENT, value));
    }

    /**
     * Equivalent to calling View.setContentDescription
     *
     * @param viewId The id of the view whose content description should change
     * @param contentDescription The new content description for the view
     */
    public void setContentDescription(int viewId, CharSequence contentDescription) {
        setCharSequence(viewId, "setContentDescription", contentDescription);
    }

    /**
     * Inflates the view hierarchy represented by this object and applies
     * all of the actions.