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

Commit a478a1e5 authored by Gilles Debunne's avatar Gilles Debunne
Browse files

Removed the no longer needed font size span flag fix

Related to bug 6448052

A text replacement (as opposed to a deletion) should (and will) not removei
the EXCLUSIVE_EXCLUSIVE spans that have limits identical to the replaced
range of charcters.

Change-Id: Iefaeab9e5119e7223ef6800c55ff0c741976e138
parent 8517794f
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -669,16 +669,6 @@ public class ChartDataUsageView extends ChartView {
            start = TextUtils.indexOf(builder, bootstrap);
            end = start + bootstrap.length();
            builder.setSpan(key, start, end, Spannable.SPAN_INCLUSIVE_INCLUSIVE);

            // Fix the AbsoluteSizeSpan created from html. Its flags must be set to
            // SPAN_INCLUSIVE_INCLUSIVE so that it survives a removal of its entire content
            Object[] spans = builder.getSpans(start, end, Object.class);
            for (int i = 0; i < spans.length; i++) {
                Object span = spans[i];
                if (builder.getSpanStart(span) == start && builder.getSpanEnd(span) == end) {
                    builder.setSpan(span, start, end, Spannable.SPAN_INCLUSIVE_INCLUSIVE);
                }
            }
        }
        builder.replace(start, end, text);
    }