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

Commit 420cf236 authored by Raph Levien's avatar Raph Levien Committed by Android (Google) Code Review
Browse files

Merge "Make measureText(String, int, int) not use context" into mnc-dev

parents 1af5fe23 1149cdc8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -606,7 +606,9 @@ public:

        Layout layout;
        TypefaceImpl* typeface = getNativeTypeface(env, jpaint);
        MinikinUtils::doLayout(&layout, paint, bidiFlags, typeface, textArray, start, count, textLength);
        // Only the substring is used for measurement, so no additional context is passed in. This
        // behavior is consistent between char[] and String specializations.
        MinikinUtils::doLayout(&layout, paint, bidiFlags, typeface, textArray + start, 0, count, count);
        width = layout.getAdvance();

        env->ReleaseStringChars(text, textArray);