(Editable edit, Object span, int start, int end, int flags, Context context)
| 1539 | } |
| 1540 | |
| 1541 | static void setSpan(Editable edit, Object span, int start, int end, int flags, Context context) { |
| 1542 | if (span instanceof CharacterStyle) |
| 1543 | edit.setSpan(CharacterStyle.wrap((CharacterStyle) span), start, end, flags); |
| 1544 | else if (span instanceof QuoteSpan) { |
| 1545 | ParagraphStyle ps = (ParagraphStyle) span; |
| 1546 | Pair<Integer, Integer> p = ensureParagraph(edit, start, end); |
| 1547 | if (p == null) |
| 1548 | return; |
| 1549 | edit.setSpan(clone(span, ps.getClass(), context), p.first, p.second, flags); |
| 1550 | } |
| 1551 | } |
| 1552 | |
| 1553 | static private Pair<Integer, Integer> ensureParagraph(Editable edit, int s, int e) { |
| 1554 | int start = s; |
no test coverage detected