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

Commit 84c45e70 authored by Raph Levien's avatar Raph Levien Committed by android-build-merger
Browse files

Enforce consistent sizes for arrays in SpannableStringInternal

am: 9cde7244

Change-Id: Ie1fa575d83754d39a6bc30ba542411709f7a2c46
parents c1d52a63 9cde7244
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import java.lang.reflect.Array;
            mText = source.toString().substring(start, end);

        mSpans = EmptyArray.OBJECT;
        // Invariant: mSpanData.length = mSpans.length * COLUMNS
        mSpanData = EmptyArray.INT;

        if (source instanceof Spanned) {
@@ -99,7 +100,7 @@ import java.lang.reflect.Array;
            Object[] srcSpans = src.mSpans;
            mSpanCount = count;
            mSpans = ArrayUtils.newUnpaddedObjectArray(mSpanCount);
            mSpanData = new int[mSpanCount * COLUMNS];
            mSpanData = new int[mSpans.length * COLUMNS];
            for (int i = 0, j = 0; i < limit; i++) {
                int spanStart = srcData[i * COLUMNS + START];
                int spanEnd = srcData[i * COLUMNS + END];