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

Commit a0b29f55 authored by Ben Gruver's avatar Ben Gruver Committed by Android (Google) Code Review
Browse files

Merge "Fix an issue where a non-styled string could be made into a styled string"

parents 7d8775a8 db6e67d8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -174,7 +174,9 @@ ssize_t StringPool::add(const String16& ident, const String16& value,
    }

    const bool first = vidx < 0;
    if (first || !mergeDuplicates) {
    const bool styled = (pos >= 0 && (size_t)pos < mEntryStyleArray.size()) ?
        mEntryStyleArray[pos].spans.size() : 0;
    if (first || styled || !mergeDuplicates) {
        pos = mEntryArray.add(eidx);
        if (first) {
            vidx = mValues.add(value, pos);