diff options
author | Neil Fuller <nfuller@google.com> | 2014-10-02 11:48:08 +0100 |
---|---|---|
committer | Neil Fuller <nfuller@google.com> | 2014-10-02 11:48:08 +0100 |
commit | f7cf5d43aa13405f9d0dd54f6038f710a0423323 (patch) | |
tree | 76f33c6e39a9ca49ff9c1d9d776cb86115bc7ff3 /core/java/android/widget/TextView.java | |
parent | 92c414724f84e32df3c0f79ce11e37ef3d481611 (diff) | |
parent | ee665151a4c6359cbfbb9a6795aa9097c4622083 (diff) | |
download | frameworks_base-f7cf5d43aa13405f9d0dd54f6038f710a0423323.zip frameworks_base-f7cf5d43aa13405f9d0dd54f6038f710a0423323.tar.gz frameworks_base-f7cf5d43aa13405f9d0dd54f6038f710a0423323.tar.bz2 |
resolved conflicts for merge of ee665151 to lmp-dev-plus-aosp
Change-Id: I97671e62de26919e391dbb2686511584c59ab990
Diffstat (limited to 'core/java/android/widget/TextView.java')
-rw-r--r-- | core/java/android/widget/TextView.java | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index a80d70a..1ba2937 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -92,7 +92,6 @@ import android.text.style.URLSpan; import android.text.style.UpdateAppearance; import android.text.util.Linkify; import android.util.AttributeSet; -import android.util.FloatMath; import android.util.Log; import android.util.TypedValue; import android.view.AccessibilityIterators.TextSegmentIterator; @@ -4790,7 +4789,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * make sure the entire cursor gets invalidated instead of * sometimes missing half a pixel. */ - float thick = FloatMath.ceil(mTextPaint.getStrokeWidth()); + float thick = (float) Math.ceil(mTextPaint.getStrokeWidth()); if (thick < 1.0f) { thick = 1.0f; } @@ -4800,10 +4799,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener // mHighlightPath is guaranteed to be non null at that point. mHighlightPath.computeBounds(TEMP_RECTF, false); - invalidate((int) FloatMath.floor(horizontalPadding + TEMP_RECTF.left - thick), - (int) FloatMath.floor(verticalPadding + TEMP_RECTF.top - thick), - (int) FloatMath.ceil(horizontalPadding + TEMP_RECTF.right + thick), - (int) FloatMath.ceil(verticalPadding + TEMP_RECTF.bottom + thick)); + invalidate((int) Math.floor(horizontalPadding + TEMP_RECTF.left - thick), + (int) Math.floor(verticalPadding + TEMP_RECTF.top - thick), + (int) Math.ceil(horizontalPadding + TEMP_RECTF.right + thick), + (int) Math.ceil(verticalPadding + TEMP_RECTF.bottom + thick)); } } else { for (int i = 0; i < mEditor.mCursorCount; i++) { @@ -6491,7 +6490,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener max = Math.max(max, layout.getLineWidth(i)); } - return (int) FloatMath.ceil(max); + return (int) Math.ceil(max); } /** @@ -6568,7 +6567,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (boring == null || boring == UNKNOWN_BORING) { if (des < 0) { - des = (int) FloatMath.ceil(Layout.getDesiredWidth(mTransformed, mTextPaint)); + des = (int) Math.ceil(Layout.getDesiredWidth(mTransformed, mTextPaint)); } width = des; } else { @@ -6598,7 +6597,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (hintBoring == null || hintBoring == UNKNOWN_BORING) { if (hintDes < 0) { - hintDes = (int) FloatMath.ceil(Layout.getDesiredWidth(mHint, mTextPaint)); + hintDes = (int) Math.ceil(Layout.getDesiredWidth(mHint, mTextPaint)); } hintWidth = hintDes; } else { @@ -6904,8 +6903,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * keep leading edge in view. */ - int left = (int) FloatMath.floor(layout.getLineLeft(line)); - int right = (int) FloatMath.ceil(layout.getLineRight(line)); + int left = (int) Math.floor(layout.getLineLeft(line)); + int right = (int) Math.ceil(layout.getLineRight(line)); if (right - left < hspace) { scrollx = (right + left) / 2 - hspace / 2; @@ -6917,10 +6916,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } } else if (a == Layout.Alignment.ALIGN_RIGHT) { - int right = (int) FloatMath.ceil(layout.getLineRight(line)); + int right = (int) Math.ceil(layout.getLineRight(line)); scrollx = right - hspace; } else { // a == Layout.Alignment.ALIGN_LEFT (will also be the default) - scrollx = (int) FloatMath.floor(layout.getLineLeft(line)); + scrollx = (int) Math.floor(layout.getLineLeft(line)); } if (ht < vspace) { @@ -6995,8 +6994,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener final int top = layout.getLineTop(line); final int bottom = layout.getLineTop(line + 1); - int left = (int) FloatMath.floor(layout.getLineLeft(line)); - int right = (int) FloatMath.ceil(layout.getLineRight(line)); + int left = (int) Math.floor(layout.getLineLeft(line)); + int right = (int) Math.ceil(layout.getLineRight(line)); int ht = layout.getHeight(); int hspace = mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight(); |