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

Commit 76c02260 authored by Dave Bort's avatar Dave Bort
Browse files

text: Remove references to android.util.Config

The semantics of Config.DEBUG will be changing soon, and all other
Config.* fields will become deprecated/hidden.

BUG=1780938
parent 42bc2ff5
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -24,7 +24,6 @@ import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.RectF;
import android.graphics.Path;
import android.graphics.Path;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.ArrayUtils;
import android.util.Config;


import junit.framework.Assert;
import junit.framework.Assert;
import android.text.style.*;
import android.text.style.*;
@@ -39,6 +38,8 @@ import android.view.KeyEvent;
 * For text that will not change, use a {@link StaticLayout}.
 * For text that will not change, use a {@link StaticLayout}.
 */
 */
public abstract class Layout {
public abstract class Layout {
    private static final boolean DEBUG = false;

    /* package */ static final EmojiFactory EMOJI_FACTORY =
    /* package */ static final EmojiFactory EMOJI_FACTORY =
        EmojiFactory.newAvailableInstance();
        EmojiFactory.newAvailableInstance();
    /* package */ static final int MIN_EMOJI, MAX_EMOJI;
    /* package */ static final int MIN_EMOJI, MAX_EMOJI;
@@ -330,7 +331,7 @@ public abstract class Layout {
            boolean hasTab = getLineContainsTab(i);
            boolean hasTab = getLineContainsTab(i);
            if (directions == DIRS_ALL_LEFT_TO_RIGHT &&
            if (directions == DIRS_ALL_LEFT_TO_RIGHT &&
                    !spannedText && !hasTab) {
                    !spannedText && !hasTab) {
                if (Config.DEBUG) {
                if (DEBUG) {
                    Assert.assertTrue(dir == DIR_LEFT_TO_RIGHT);
                    Assert.assertTrue(dir == DIR_LEFT_TO_RIGHT);
                    Assert.assertNotNull(c);
                    Assert.assertNotNull(c);
                }
                }
@@ -797,7 +798,7 @@ public abstract class Layout {
    }
    }
    
    
    private int getLineVisibleEnd(int line, int start, int end) {
    private int getLineVisibleEnd(int line, int start, int end) {
        if (Config.DEBUG) {
        if (DEBUG) {
            Assert.assertTrue(getLineStart(line) == start && getLineStart(line+1) == end);
            Assert.assertTrue(getLineStart(line) == start && getLineStart(line+1) == end);
        }
        }


@@ -1340,7 +1341,7 @@ public abstract class Layout {
        char[] buf;
        char[] buf;
        if (!hasTabs) {
        if (!hasTabs) {
            if (directions == DIRS_ALL_LEFT_TO_RIGHT) {
            if (directions == DIRS_ALL_LEFT_TO_RIGHT) {
                if (Config.DEBUG) {
                if (DEBUG) {
                    Assert.assertTrue(DIR_LEFT_TO_RIGHT == dir);
                    Assert.assertTrue(DIR_LEFT_TO_RIGHT == dir);
                }
                }
                Styled.drawText(canvas, text, start, end, dir, false, x, top, y, bottom, paint, workPaint, false);
                Styled.drawText(canvas, text, start, end, dir, false, x, top, y, bottom, paint, workPaint, false);