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

Commit 6f29b7aa authored by Siyamed Sinir's avatar Siyamed Sinir
Browse files

Revert "Request re-layout after setText if layout width is 0"

This reverts commit b4b8740a.
Reverts fix for bug 27995311.

Test: cts-tradefed run cts --test android.widget.cts.TextViewTest -m
CtsWidgetTestCases --skip-device-info --skip-preconditions
--skip-connectivity-check

Fixes: 34843459
Change-Id: I2cea04cd12953b110c59a5a84e9eea5060fc038d
parent 2f837e7b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -8208,7 +8208,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        // If we have a fixed width, we can just swap in a new text layout
        // If we have a fixed width, we can just swap in a new text layout
        // if the text height stays the same or if the view height is fixed.
        // if the text height stays the same or if the view height is fixed.


        if (((mLayoutParams.width != LayoutParams.WRAP_CONTENT && mLayoutParams.width != 0)
        if ((mLayoutParams.width != LayoutParams.WRAP_CONTENT
                || (mMaxWidthMode == mMinWidthMode && mMaxWidth == mMinWidth))
                || (mMaxWidthMode == mMinWidthMode && mMaxWidth == mMinWidth))
                && (mHint == null || mHintLayout != null)
                && (mHint == null || mHintLayout != null)
                && (mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight() > 0)) {
                && (mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight() > 0)) {