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

Commit 3bef4908 authored by Siyamed Sinir's avatar Siyamed Sinir
Browse files

Move MeasuredText.sRegistry to Builder

Test: atest android.graphics.text.cts.MeasuredTextTest
Test: atest android.graphics.text.cts.LineBreakerTest
Test: atest android.text.cts.StaticLayoutTest

Bug: 117888473
Bug: 112327179
Change-Id: I0c1b86928429dce02867ac0cba674e0f69fc5fdf
parent 367d14a1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -48,9 +48,6 @@ import libcore.util.NativeAllocationRegistry;
 * </p>
 */
public class MeasuredText {
    private static final NativeAllocationRegistry sRegistry = new NativeAllocationRegistry(
            MeasuredText.class.getClassLoader(), nGetReleaseFunc(), 1024);

    private long mNativePtr;
    private @NonNull char[] mChars;

@@ -166,6 +163,9 @@ public class MeasuredText {
     * Note: The appendStyle and appendReplacementRun should be called to cover the text length.
     */
    public static class Builder {
        private static final NativeAllocationRegistry sRegistry = new NativeAllocationRegistry(
                MeasuredText.class.getClassLoader(), nGetReleaseFunc(), 1024);

        private long mNativePtr;

        private final @NonNull char[] mText;