private void endList(boolean orderedList){
  if (!mParagraphStyles.isEmpty()) {
    AccumulatedParagraphStyle style=mParagraphStyles.peek();
    ParagraphType type=style.getType();
    if ((orderedList && (type.isNumbering() || type == ParagraphType.INDENTATION_OL)) || (!orderedList && (type.isBullet() || type == ParagraphType.INDENTATION_UL))) {
      int indent=style.getRelativeIndent();
      if (indent > 1) {
        style.setRelativeIndent(indent - 1);
        style.setAbsoluteIndent(style.getAbsoluteIndent() - 1);
      }
 else {
        mParagraphStyles.pop();
      }
    }
 else {
      mParagraphStyles.pop();
      endList(orderedList);
    }
  }
}

private void endList ( boolean orderedList ) { if ( ! mParagraphStyles . isEmpty ( ) ) { AccumulatedParagraphStyle style = mParagraphStyles . peek ( ) ; ParagraphType type = style . getType ( ) ; if ( ( orderedList && ( type . isNumbering ( ) || type == ParagraphType . INDENTATION_OL ) ) || ( ! orderedList && ( type . isBullet ( ) || type == ParagraphType . INDENTATION_UL ) ) ) { int indent = style . getRelativeIndent ( ) ; if ( indent > 1 ) { style . setRelativeIndent ( indent - 1 ) ; style . setAbsoluteIndent ( style . getAbsoluteIndent ( ) - 1 ) ; } else { mParagraphStyles . pop ( ) ; } } else { mParagraphStyles . pop ( ) ; endList ( orderedList ) ; } } }
handles ol and ul end tags
