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

Commit 9d3bd08e authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Rename PremeasuredText to MeasuredText

There is already MeasuredText, so renamed existing MeasuredText to
MeasuredParagraph, then renamed PremeasuredText to MeasuredText.

Bug: 67504091
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsTextTestCases:*
Change-Id: Ie20bea9501b18fabb36f64d388a7851c4643d4c3
parent 11954f50
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -190,7 +190,7 @@ public class StaticLayoutPerfTest {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        while (state.keepRunning()) {
        while (state.keepRunning()) {
            state.pauseTiming();
            state.pauseTiming();
            final PremeasuredText text = PremeasuredText.build(
            final MeasuredText text = MeasuredText.build(
                    generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT, LTR);
                    generateRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT, LTR);
            state.resumeTiming();
            state.resumeTiming();


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


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


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


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


+14 −14
Original line number Original line Diff line number Diff line
@@ -42158,20 +42158,9 @@ package android.text {
    method public boolean isAllowed(char);
    method public boolean isAllowed(char);
  }
  }
  public abstract interface NoCopySpan {
  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);
  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);
    method public char charAt(int);
    method public char charAt(int);
    method public int getEnd();
    method public int getEnd();
    method public android.text.TextPaint getPaint();
    method public android.text.TextPaint getPaint();
@@ -42190,6 +42179,17 @@ package android.text {
    method public java.lang.CharSequence subSequence(int, int);
    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 {
  public class Selection {
    method public static boolean extendDown(android.text.Spannable, android.text.Layout);
    method public static boolean extendDown(android.text.Spannable, android.text.Layout);
    method public static boolean extendLeft(android.text.Spannable, android.text.Layout);
    method public static boolean extendLeft(android.text.Spannable, android.text.Layout);
+2 −2
Original line number Original line 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,
    private static float measurePara(TextPaint paint, CharSequence text, int start, int end,
            TextDirectionHeuristic textDir) {
            TextDirectionHeuristic textDir) {
        MeasuredText mt = null;
        MeasuredParagraph mt = null;
        TextLine tl = TextLine.obtain();
        TextLine tl = TextLine.obtain();
        try {
        try {
            mt = MeasuredText.buildForBidi(text, start, end, textDir, mt);
            mt = MeasuredParagraph.buildForBidi(text, start, end, textDir, mt);
            final char[] chars = mt.getChars();
            final char[] chars = mt.getChars();
            final int len = chars.length;
            final int len = chars.length;
            final Directions directions = mt.getDirections(0, len);
            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