From 3bef4908b2d9392d8bae6900bd236c4be77f0323 Mon Sep 17 00:00:00 2001 From: Siyamed Sinir Date: Tue, 30 Oct 2018 14:53:18 -0700 Subject: [PATCH] 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 --- graphics/java/android/graphics/text/MeasuredText.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/graphics/java/android/graphics/text/MeasuredText.java b/graphics/java/android/graphics/text/MeasuredText.java index 3efe655b25654..6f786517ba125 100644 --- a/graphics/java/android/graphics/text/MeasuredText.java +++ b/graphics/java/android/graphics/text/MeasuredText.java @@ -48,9 +48,6 @@ import libcore.util.NativeAllocationRegistry; *

*/ 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;