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

Commit 29a2bd7a authored by Siyamed Sinir's avatar Siyamed Sinir Committed by Android (Google) Code Review
Browse files

Merge "Prevent crash for Span change events"

parents c99dea0a 1fb80bbc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1096,6 +1096,11 @@ public class DynamicLayout extends Layout {

        public void onSpanChanged(Spannable s, Object o, int start, int end, int nstart, int nend) {
            if (o instanceof UpdateLayout) {
                if (start > end) {
                    // Bug: 67926915 start cannot be determined, fallback to reflow from start
                    // instead of causing an exception
                    start = 0;
                }
                reflow(s, start, end - start, end - start);
                reflow(s, nstart, nend - nstart, nend - nstart);
            }