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

Commit db6e67d8 authored by Ben Gruver's avatar Ben Gruver
Browse files

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

If a styled version of an otherwise identical string is encountered before
a non-styled version, aapt merges the two, effectively making the
non-styled string have a spurious style.

Change-Id: I424a61c0c83c59e0b9c8939e457402efd06a7a4f
parent 42f23b3c
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);