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

Commit b01e18c3 authored by Seigo Nonaka's avatar Seigo Nonaka Committed by Android (Google) Code Review
Browse files

Merge "Rename PremeasuredText to MeasuredText"

parents 02c0e986 9d3bd08e
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -190,7 +190,7 @@ public class StaticLayoutPerfTest {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        while (state.keepRunning()) {
            state.pauseTiming();
            final PremeasuredText text = PremeasuredText.build(
            final MeasuredText text = MeasuredText.build(
                    generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT, LTR);
            state.resumeTiming();

@@ -206,7 +206,7 @@ public class StaticLayoutPerfTest {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        while (state.keepRunning()) {
            state.pauseTiming();
            final PremeasuredText text = PremeasuredText.build(
            final MeasuredText text = MeasuredText.build(
                    generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT, LTR);
            state.resumeTiming();

@@ -222,7 +222,7 @@ public class StaticLayoutPerfTest {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        while (state.keepRunning()) {
            state.pauseTiming();
            final PremeasuredText text = PremeasuredText.build(
            final MeasuredText text = MeasuredText.build(
                    generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT, LTR);
            state.resumeTiming();

@@ -238,7 +238,7 @@ public class StaticLayoutPerfTest {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        while (state.keepRunning()) {
            state.pauseTiming();
            final PremeasuredText text = PremeasuredText.build(
            final MeasuredText text = MeasuredText.build(
                    generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT, LTR);
            state.resumeTiming();

@@ -254,7 +254,7 @@ public class StaticLayoutPerfTest {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        while (state.keepRunning()) {
            state.pauseTiming();
            final PremeasuredText text = PremeasuredText.build(
            final MeasuredText text = MeasuredText.build(
                    generateRandomParagraph(WORD_LENGTH, STYLE_TEXT), PAINT, LTR);
            state.resumeTiming();

+14 −14
Original line number Diff line number Diff line
@@ -42296,20 +42296,9 @@ package android.text {
    method public boolean isAllowed(char);
  }
  public abstract interface NoCopySpan {
  }
  public static class NoCopySpan.Concrete implements android.text.NoCopySpan {
    ctor public NoCopySpan.Concrete();
  }
  public abstract interface ParcelableSpan implements android.os.Parcelable {
    method public abstract int getSpanTypeId();
  }
  public class PremeasuredText implements android.text.Spanned {
    method public static android.text.PremeasuredText build(java.lang.CharSequence, android.text.TextPaint, android.text.TextDirectionHeuristic);
    method public static android.text.PremeasuredText build(java.lang.CharSequence, android.text.TextPaint, android.text.TextDirectionHeuristic, int, int);
  public class MeasuredText implements android.text.Spanned {
    method public static android.text.MeasuredText build(java.lang.CharSequence, android.text.TextPaint, android.text.TextDirectionHeuristic);
    method public static android.text.MeasuredText build(java.lang.CharSequence, android.text.TextPaint, android.text.TextDirectionHeuristic, int, int);
    method public char charAt(int);
    method public int getEnd();
    method public android.text.TextPaint getPaint();
@@ -42328,6 +42317,17 @@ package android.text {
    method public java.lang.CharSequence subSequence(int, int);
  }
  public abstract interface NoCopySpan {
  }
  public static class NoCopySpan.Concrete implements android.text.NoCopySpan {
    ctor public NoCopySpan.Concrete();
  }
  public abstract interface ParcelableSpan implements android.os.Parcelable {
    method public abstract int getSpanTypeId();
  }
  public class Selection {
    method public static boolean extendDown(android.text.Spannable, android.text.Layout);
    method public static boolean extendLeft(android.text.Spannable, android.text.Layout);
+2 −2
Original line number Diff line number Diff line
@@ -1917,10 +1917,10 @@ public abstract class Layout {

    private static float measurePara(TextPaint paint, CharSequence text, int start, int end,
            TextDirectionHeuristic textDir) {
        MeasuredText mt = null;
        MeasuredParagraph mt = null;
        TextLine tl = TextLine.obtain();
        try {
            mt = MeasuredText.buildForBidi(text, start, end, textDir, mt);
            mt = MeasuredParagraph.buildForBidi(text, start, end, textDir, mt);
            final char[] chars = mt.getChars();
            final int len = chars.length;
            final Directions directions = mt.getDirections(0, len);
+677 −0

File added.

Preview size limit exceeded, changes collapsed.

+166 −572

File changed.

Preview size limit exceeded, changes collapsed.

Loading