diff options
| author | Fabrice Di Meglio <fdimeglio@google.com> | 2013-02-11 18:27:34 -0800 |
|---|---|---|
| committer | Fabrice Di Meglio <fdimeglio@google.com> | 2013-02-12 13:12:13 -0800 |
| commit | 6d9fe5bd22b531bfce69b146254a4791c76acddc (patch) | |
| tree | a4e7fee99c29961e17955f771b03fb1318d0bbd5 /core/java/android/text/TextLine.java | |
| parent | 981e60edc3ed91ea8b5e1dae98669b88b175e19b (diff) | |
Clean Paint.mBidiFlags as it is no longer used
See bug #7623824
Change-Id: Ie2f9422821f6dcc73c99e8695f448e966b587b1d
Diffstat (limited to 'core/java/android/text/TextLine.java')
| -rw-r--r-- | core/java/android/text/TextLine.java | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/core/java/android/text/TextLine.java b/core/java/android/text/TextLine.java index 1fecf81d5a4f..e34a0efccf21 100644 --- a/core/java/android/text/TextLine.java +++ b/core/java/android/text/TextLine.java @@ -664,14 +664,13 @@ class TextLine { } } - int flags = runIsRtl ? Paint.DIRECTION_RTL : Paint.DIRECTION_LTR; int cursorOpt = after ? Paint.CURSOR_AFTER : Paint.CURSOR_BEFORE; if (mCharsValid) { return wp.getTextRunCursor(mChars, spanStart, spanLimit - spanStart, - flags, offset, cursorOpt); + offset, cursorOpt); } else { return wp.getTextRunCursor(mText, mStart + spanStart, - mStart + spanLimit, flags, mStart + offset, cursorOpt) - mStart; + mStart + spanLimit, mStart + offset, cursorOpt) - mStart; } } @@ -738,15 +737,13 @@ class TextLine { int contextLen = contextEnd - contextStart; if (needWidth || (c != null && (wp.bgColor != 0 || wp.underlineColor != 0 || runIsRtl))) { - int flags = runIsRtl ? Paint.DIRECTION_RTL : Paint.DIRECTION_LTR; if (mCharsValid) { ret = wp.getTextRunAdvances(mChars, start, runLen, - contextStart, contextLen, flags, null, 0); + contextStart, contextLen, null, 0); } else { int delta = mStart; - ret = wp.getTextRunAdvances(mText, delta + start, - delta + end, delta + contextStart, delta + contextEnd, - flags, null, 0); + ret = wp.getTextRunAdvances(mText, delta + start, delta + end, + delta + contextStart, delta + contextEnd, null, 0); } } @@ -786,8 +783,7 @@ class TextLine { wp.setAntiAlias(previousAntiAlias); } - drawTextRun(c, wp, start, end, contextStart, contextEnd, runIsRtl, - x, y + wp.baselineShift); + drawTextRun(c, wp, start, end, contextStart, contextEnd, x, y + wp.baselineShift); } return runIsRtl ? -ret : ret; @@ -970,23 +966,21 @@ class TextLine { * @param end the end of the run * @param contextStart the start of context for the run * @param contextEnd the end of the context for the run - * @param runIsRtl true if the run is right-to-left * @param x the x position of the left edge of the run * @param y the baseline of the run */ private void drawTextRun(Canvas c, TextPaint wp, int start, int end, - int contextStart, int contextEnd, boolean runIsRtl, float x, int y) { + int contextStart, int contextEnd, float x, int y) { - int flags = runIsRtl ? Canvas.DIRECTION_RTL : Canvas.DIRECTION_LTR; if (mCharsValid) { int count = end - start; int contextCount = contextEnd - contextStart; c.drawTextRun(mChars, start, count, contextStart, contextCount, - x, y, flags, wp); + x, y, wp); } else { int delta = mStart; c.drawTextRun(mText, delta + start, delta + end, - delta + contextStart, delta + contextEnd, x, y, flags, wp); + delta + contextStart, delta + contextEnd, x, y, wp); } } |
