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

Commit 5645df23 authored by Raph Levien's avatar Raph Levien Committed by Android Git Automerger
Browse files

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

* commit '420cf236':
  Make measureText(String, int, int) not use context
parents d1741ef9 420cf236
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);