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

Commit 32910e72 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bug 5031652 - offer a way to associate metadata with an ActionMode"

parents 2d6080df f178737f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -20931,11 +20931,13 @@ package android.view {
    method public abstract android.view.Menu getMenu();
    method public abstract android.view.MenuInflater getMenuInflater();
    method public abstract java.lang.CharSequence getSubtitle();
    method public java.lang.Object getTag();
    method public abstract java.lang.CharSequence getTitle();
    method public abstract void invalidate();
    method public abstract void setCustomView(android.view.View);
    method public abstract void setSubtitle(java.lang.CharSequence);
    method public abstract void setSubtitle(int);
    method public void setTag(java.lang.Object);
    method public abstract void setTitle(java.lang.CharSequence);
    method public abstract void setTitle(int);
  }
+30 −0
Original line number Diff line number Diff line
@@ -23,6 +23,36 @@ package android.view;
 * Examples of good action modes include selection modes, search, content editing, etc.
 */
public abstract class ActionMode {
    private Object mTag;

    /**
     * Set a tag object associated with this ActionMode.
     *
     * <p>Like the tag available to views, this allows applications to associate arbitrary
     * data with an ActionMode for later reference.
     *
     * @param tag Tag to associate with this ActionMode
     *
     * @see #getTag()
     */
    public void setTag(Object tag) {
        mTag = tag;
    }

    /**
     * Retrieve the tag object associated with this ActionMode.
     *
     * <p>Like the tag available to views, this allows applications to associate arbitrary
     * data with an ActionMode for later reference.
     *
     * @return Tag associated with this ActionMode
     *
     * @see #setTag(Object)
     */
    public Object getTag() {
        return mTag;
    }

    /**
     * Set the title of the action mode. This method will have no visible effect if
     * a custom view has been set.