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

Commit 209346fa authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove final from View.setTooltipText/getTooltipText"

parents 89863ea4 9aa7edfa
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -44652,7 +44652,7 @@ package android.view {
    method public java.lang.Object getTag(int);
    method public int getTextAlignment();
    method public int getTextDirection();
    method public final java.lang.CharSequence getTooltipText();
    method public java.lang.CharSequence getTooltipText();
    method public final int getTop();
    method protected float getTopFadingEdgeStrength();
    method protected int getTopPaddingOffset();
@@ -44958,7 +44958,7 @@ package android.view {
    method public void setTag(int, java.lang.Object);
    method public void setTextAlignment(int);
    method public void setTextDirection(int);
    method public final void setTooltipText(java.lang.CharSequence);
    method public void setTooltipText(java.lang.CharSequence);
    method public final void setTop(int);
    method public void setTouchDelegate(android.view.TouchDelegate);
    method public final void setTransitionName(java.lang.String);
+2 −2
Original line number Diff line number Diff line
@@ -48092,7 +48092,7 @@ package android.view {
    method public java.lang.Object getTag(int);
    method public int getTextAlignment();
    method public int getTextDirection();
    method public final java.lang.CharSequence getTooltipText();
    method public java.lang.CharSequence getTooltipText();
    method public final int getTop();
    method protected float getTopFadingEdgeStrength();
    method protected int getTopPaddingOffset();
@@ -48398,7 +48398,7 @@ package android.view {
    method public void setTag(int, java.lang.Object);
    method public void setTextAlignment(int);
    method public void setTextDirection(int);
    method public final void setTooltipText(java.lang.CharSequence);
    method public void setTooltipText(java.lang.CharSequence);
    method public final void setTop(int);
    method public void setTouchDelegate(android.view.TouchDelegate);
    method public final void setTransitionName(java.lang.String);
+2 −2
Original line number Diff line number Diff line
@@ -44961,7 +44961,7 @@ package android.view {
    method public java.lang.Object getTag(int);
    method public int getTextAlignment();
    method public int getTextDirection();
    method public final java.lang.CharSequence getTooltipText();
    method public java.lang.CharSequence getTooltipText();
    method public android.view.View getTooltipView();
    method public final int getTop();
    method protected float getTopFadingEdgeStrength();
@@ -45268,7 +45268,7 @@ package android.view {
    method public void setTag(int, java.lang.Object);
    method public void setTextAlignment(int);
    method public void setTextDirection(int);
    method public final void setTooltipText(java.lang.CharSequence);
    method public void setTooltipText(java.lang.CharSequence);
    method public final void setTop(int);
    method public void setTouchDelegate(android.view.TouchDelegate);
    method public final void setTransitionName(java.lang.String);
+18 −6
Original line number Diff line number Diff line
@@ -24899,13 +24899,20 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * Sets the tooltip text which will be displayed in a small popup next to the view.
     * <p>
     * The tooltip will be displayed:
     * <ul>
     * <li>On long click, unless is not handled otherwise (by OnLongClickListener or a context
     * menu). </li>
     * <li>On hover, after a brief delay since the pointer has stopped moving </li>
     * </ul>
     * <p>
     * <strong>Note:</strong> Do not override this method, as it will have no
     * effect on the text displayed in the tooltip.
     *
     * @param tooltipText the tooltip text, or null if no tooltip is required
     * @see #getTooltipText()
     * @attr ref android.R.styleable#View_tooltipText
     */
    public final void setTooltipText(@Nullable CharSequence tooltipText) {
    public void setTooltipText(@Nullable CharSequence tooltipText) {
        if (TextUtils.isEmpty(tooltipText)) {
            setFlags(0, TOOLTIP);
            hideTooltip();
@@ -24934,10 +24941,16 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    /**
     * Returns the view's tooltip text.
     *
     * <strong>Note:</strong> Do not override this method, as it will have no
     * effect on the text displayed in the tooltip. You must call
     * {@link #setTooltipText(CharSequence)} to modify the tooltip text.
     *
     * @return the tooltip text
     * @see #setTooltipText(CharSequence)
     * @attr ref android.R.styleable#View_tooltipText
     */
    @Nullable
    public final CharSequence getTooltipText() {
    public CharSequence getTooltipText() {
        return mTooltipInfo != null ? mTooltipInfo.mTooltipText : null;
    }
@@ -24950,21 +24963,20 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    }
    private boolean showTooltip(int x, int y, boolean fromLongClick) {
        if (mAttachInfo == null) {
        if (mAttachInfo == null || mTooltipInfo == null) {
            return false;
        }
        if ((mViewFlags & ENABLED_MASK) != ENABLED) {
            return false;
        }
        final CharSequence tooltipText = getTooltipText();
        if (TextUtils.isEmpty(tooltipText)) {
        if (TextUtils.isEmpty(mTooltipInfo.mTooltipText)) {
            return false;
        }
        hideTooltip();
        mTooltipInfo.mTooltipFromLongClick = fromLongClick;
        mTooltipInfo.mTooltipPopup = new TooltipPopup(getContext());
        final boolean fromTouch = (mPrivateFlags3 & PFLAG3_FINGER_DOWN) == PFLAG3_FINGER_DOWN;
        mTooltipInfo.mTooltipPopup.show(this, x, y, fromTouch, tooltipText);
        mTooltipInfo.mTooltipPopup.show(this, x, y, fromTouch, mTooltipInfo.mTooltipText);
        mAttachInfo.mTooltipHost = this;
        return true;
    }